diff --git a/docs/building/migrations.mdx b/docs/building/migrations.mdx index 6e65e5fbe..a37799389 100644 --- a/docs/building/migrations.mdx +++ b/docs/building/migrations.mdx @@ -69,7 +69,7 @@ All these three console applications the `tom` example, `tom` migrations for uni ## Prerequisites -Working MySQL database server as the `tom` migrations currently provides support only for the MySQL database. +Any of the [supported databases](database/getting-started.mdx#introduction), `tom` is able to generate DDL queries for all these databases. Install required dependencies and build the `TinyORM` library with the `tom` (it's enabled by default) as is described [here](building/hello-world.mdx#install-dependencies) and [here](building/tinyorm.mdx). @@ -191,6 +191,8 @@ And paste the following code. {charset_, qEnvironmentVariable("DB_MYSQL_CHARSET", UTF8MB4)}, {collation_, qEnvironmentVariable("DB_MYSQL_COLLATION", UTF8MB40900aici)}, {timezone_, TZ00}, + // Specifies what time zone all QDateTime-s will have + {"qt_timezone", QVariant::fromValue(Qt::UTC)}, {prefix_, EMPTY}, {prefix_indexes, false}, {strict_, true}, @@ -199,11 +201,11 @@ And paste the following code. {Version, {}}, // Autodetect {options_, QVariantHash()}, }, - QStringLiteral("tinyorm_tom")); + QStringLiteral("tinyorm_tom")); // shell:connection } :::tip -If you have defined more database connections then you can tag the lines with the database connection names with the `// shell:connection` comment and this connection names will be provided to the bash/zsh/pwsh completion for the `--database=` option, [example](https://github.com/silverqx/TinyORM/blob/main/examples/tom/main.cpp#L74). +If you have defined more database connections then you can tag the lines with the database connection names with the `// shell:connection` comment and this connection names will be provided to the bash, zsh, pwsh completions for the `--database=` option 😎, [example](https://github.com/silverqx/TinyORM/blob/main/examples/tom/main.cpp#L74). ::: ### Migrations diff --git a/docs/building/tinyorm.mdx b/docs/building/tinyorm.mdx index 881bd3891..b2c54037b 100644 --- a/docs/building/tinyorm.mdx +++ b/docs/building/tinyorm.mdx @@ -542,6 +542,10 @@ On `Linux`, you can install the `range-v3` library and some other [dependencies] I recommend creating a new [`Session`](https://doc.qt.io/qtcreator/creator-project-managing-sessions.html) in the `QtCreator`, this way you will have all the examples in one place and as a bonus, everything will be in the same place when you close and reopen `QtCreator IDE`. You can name it `tinyorm.org` or `TinyORM examples`, it is up to you. ::: +:::tip +If you are using sessions, you can use a single `clangd` instance for all projects in this session in the `QtCreator IDE`. One significant advantage of this method is that the `.qtc_clangd/` folder will not be created in the build folder, but will be stored globally in the Roaming profile. You can enable it in the `Settings` - `C++` - `Clangd` - `Sessions with a single clangd instance`. +::: + #### Configure TinyORM Now you are ready to configure the `TinyORM` library. The `qmake` does not support auto-configuration of dependencies out of the box, to configure TinyORM's `qmake` build dependencies you have to copy the `conf.pri.example` file to the `conf.pri` and manually edit the `INCLUDEPATH` and `LIBS`. This way you can override any `qmake` build options or variables. diff --git a/docs/database/getting-started.mdx b/docs/database/getting-started.mdx index 3dbfeb85a..b4419aeed 100644 --- a/docs/database/getting-started.mdx +++ b/docs/database/getting-started.mdx @@ -1,7 +1,7 @@ --- sidebar_position: 0 sidebar_label: Getting Started -description: TinyORM makes interacting with a database extremely simple using raw SQL, a fluent query builder, and the TinyORM. It provides first-party support for three databases MySQL/MariaDB, PostgreSQL, and SQLite. +description: TinyORM makes interacting with a database extremely simple using raw SQL, a fluent query builder, and the TinyORM. It provides first-party support for four databases MySQL/MariaDB, PostgreSQL, and SQLite. keywords: [c++ orm, database, getting started, tinyorm] --- @@ -30,7 +30,7 @@ import { ## Introduction -Almost every modern application interacts with a database. TinyORM makes interacting with a database extremely simple using raw SQL, a [fluent query builder](database/query-builder.mdx), and the [TinyORM](tinyorm/getting-started.mdx). Currently, TinyORM provides first-party support for three databases: +Almost every modern application interacts with a database. TinyORM makes interacting with a database extremely simple using raw SQL, a [fluent query builder](database/query-builder.mdx), and the [TinyORM](tinyorm/getting-started.mdx). Currently, TinyORM provides first-party support for four databases: