From 9f5fcb06cdc5bccf1adac94f7dea0c6da0c94f2e Mon Sep 17 00:00:00 2001 From: silverqx Date: Wed, 15 Feb 2023 20:59:46 +0100 Subject: [PATCH] docs used QStringLiteral in full configurations --- docs/database/getting-started.mdx | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/database/getting-started.mdx b/docs/database/getting-started.mdx index ecb4a4adb..174e4114c 100644 --- a/docs/database/getting-started.mdx +++ b/docs/database/getting-started.mdx @@ -148,9 +148,9 @@ You can create and configure a new database connection using the `create` method {charset_, qEnvironmentVariable("DB_CHARSET", UTF8MB4)}, {collation_, qEnvironmentVariable("DB_COLLATION", UTF8MB40900aici)}, // SSL-related - {ssl_ca, "C:/mysql/data/ca.pem"}, - {ssl_cert, "C:/mysql/data/client-cert.pem"}, - {ssl_key, "C:/mysql/data/client-key.pem"}, + {ssl_ca, QStringLiteral("C:/mysql/data/ca.pem")}, + {ssl_cert, QStringLiteral("C:/mysql/data/client-cert.pem")}, + {ssl_key, QStringLiteral("C:/mysql/data/client-key.pem")}, // Or // {options, ConfigUtils::mysqlSslOptions()}, {timezone_, TZ00}, @@ -159,14 +159,14 @@ You can create and configure a new database connection using the `create` method {prefix_, EMPTY}, {prefix_indexes, false}, {strict_, true}, - // {isolation_level, "REPEATABLE READ"}, // MySQL default is REPEATABLE READ for InnoDB + // {isolation_level, QStringLiteral("REPEATABLE READ")}, // MySQL default is REPEATABLE READ for InnoDB {engine_, InnoDB}, {Version, {}}, // Autodetect {options_, QVariantHash()}, // Examples - // {options_, "MYSQL_OPT_CONNECT_TIMEOUT = 1 ; MYSQL_OPT_READ_TIMEOUT=1"}, - // {options_, QVariantHash {{"MYSQL_OPT_CONNECT_TIMEOUT", 1}, - // {"MYSQL_OPT_READ_TIMEOUT", 1}}}, + // {options_, QStringLiteral("MYSQL_OPT_CONNECT_TIMEOUT = 1 ; MYSQL_OPT_READ_TIMEOUT=1")}, + // {options_, QVariantHash {{QStringLiteral("MYSQL_OPT_CONNECT_TIMEOUT"), 1}, + // {QStringLiteral("MYSQL_OPT_READ_TIMEOUT"), 1}}}, }); @@ -183,7 +183,7 @@ You can create and configure a new database connection using the `create` method // Ownership of a shared_ptr() auto manager = DB::create({ {driver_, QPSQL}, - {application_name, "Example application"}, + {application_name, QStringLiteral("Example application")}, {host_, qEnvironmentVariable("DB_HOST", H127001)}, {port_, qEnvironmentVariable("DB_PORT", P5432)}, {database_, qEnvironmentVariable("DB_DATABASE", EMPTY)}, @@ -192,10 +192,10 @@ You can create and configure a new database connection using the `create` method {password_, qEnvironmentVariable("DB_PASSWORD", EMPTY)}, {charset_, qEnvironmentVariable("DB_CHARSET", UTF8)}, // SSL-related - {sslmode_, "verify-full"}, - {sslcert, "C:/example/postgres.crt"}, - {sslkey, "C:/example/postgres.key"}, - {sslrootcert, "C:/example/root.crt"}, + {sslmode_, QStringLiteral("verify-full")}, + {sslcert, QStringLiteral("C:/example/postgres.crt")}, + {sslkey, QStringLiteral("C:/example/postgres.key")}, + {sslrootcert, QStringLiteral("C:/example/root.crt")}, // Or // {options_, ConfigUtils::postgresSslOptions()}, {timezone_, UTC}, @@ -203,8 +203,8 @@ You can create and configure a new database connection using the `create` method {qt_timezone, QVariant::fromValue(Qt::UTC)}, {prefix_, EMPTY}, {prefix_indexes, false}, - // {isolation_level, "REPEATABLE READ"}, // Postgres default is READ COMMITTED - // {synchronous_commit, "off"}, // Postgres default is on + // {isolation_level, QStringLiteral("REPEATABLE READ")}, // Postgres default is READ COMMITTED + // {synchronous_commit, QStringLiteral("off")}, // Postgres default is on // ConnectionFactory provides a default value for this, this is only for reference // {dont_drop, QStringList {spatial_ref_sys}}, {options_, QVariantHash()},