docs used QStringLiteral in full configurations

This commit is contained in:
silverqx
2023-02-15 20:59:46 +01:00
parent b40413a24d
commit 9f5fcb06cd

View File

@@ -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}}},
});
</TabItem>
@@ -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()},