You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: TinyORM is a modern c++ ORM library that makes interacting with a database extremely simple. It depends on the QtCore and QtSql libraries. The code is written in the modern c++20 way and is well tested with the unit and functional tests.
@@ -14,12 +14,12 @@ The code is written in the modern c++20 way and is well tested with the unit and
Copy file name to clipboardexpand all lines: docs/building/hello-world.mdx
+12-11
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
---
2
-
sidebar_position: 10
2
+
sidebar_position: 2
3
+
sidebar_label: Hello world
3
4
description: Hello world example created in the terminal and QtCreator IDE.
4
5
---
5
6
@@ -40,7 +41,7 @@ import {
40
41
41
42
We will try to create the simplest working application in the terminal with the `CMake` and in the `QtCreator` IDE with the `qmake`.
42
43
43
-
The `HelloWorld` example also expects the following [folders structure](building-tinyorm.mdx#folders-structure), let's create them.
44
+
The `HelloWorld` example also expects the following [folders structure](building/tinyorm.mdx#folders-structure), let's create them.
44
45
45
46
<TabsgroupId={shell}>
46
47
<TabItemvalue={pwsh}label={pwsh_label}>
@@ -75,7 +76,7 @@ select * from posts;"
75
76
76
77
## Install dependencies
77
78
78
-
First, install the `vcpkg` package manager as is described [here](building-tinyorm.mdx#vcpkg).
79
+
First, install the `vcpkg` package manager as is described [here](building/tinyorm.mdx#vcpkg).
79
80
80
81
The `range-v3` and `tabulate` libraries are required dependencies because `TinyORM` uses them in header files, you have to install them before you can use `TinyORM`. The `tabulate` library is only needed in the `tom` migrations it's used by the `migrate:status` command.
81
82
@@ -294,7 +295,7 @@ cmake --build . --target all
294
295
295
296
### Execute Hello world {#execute-hello-world-cmake}
296
297
297
-
Do not forget to add `TinyOrm0d.dll` on the path on Windows and on the `LD_LIBRARY_PATH` on Linux, so `HelloWorld` application can find it during execution, as is described [here](building-tinyorm.mdx#tinyorm-on-path-cmake).
298
+
Do not forget to add `TinyOrm0d.dll` on the path on Windows and on the `LD_LIBRARY_PATH` on Linux, so `HelloWorld` application can find it during execution, as is described [here](building/tinyorm.mdx#tinyorm-on-path-cmake).
298
299
299
300
<TabsgroupId={shell}name='tinyorm-on-path'>
300
301
<TabItemvalue={pwsh}label={pwsh_label}>
@@ -309,7 +310,7 @@ Do not forget to add `TinyOrm0d.dll` on the path on Windows and on the `LD_LIBRA
309
310
</TabItem>
310
311
</Tabs>
311
312
312
-
Create a symbolic link to the `HelloWorld.sqlite3` database inside the build folder. If you do not have enabled symbolic links without `Administrator` rights on your `Windows`, you can just simply copy the `HelloWorld.sqlite3` database or [`Allow symbolic links unprivileged`](building-tinyorm.mdx#allow-symbolic-links-unprivileged).
313
+
Create a symbolic link to the `HelloWorld.sqlite3` database inside the build folder. If you do not have enabled symbolic links without `Administrator` rights on your `Windows`, you can just simply copy the `HelloWorld.sqlite3` database or [`Allow symbolic links unprivileged`](building/tinyorm.mdx#allow-symbolic-links-unprivileged).
313
314
314
315
<TabsgroupId={shell}name='tinyorm-on-path'>
315
316
<TabItemvalue={pwsh}label={pwsh_label}>
@@ -412,7 +413,7 @@ unix:!macx: \
412
413
```
413
414
414
415
:::caution
415
-
The exact [folders structure](building-tinyorm.mdx#folders-structure) is crucial in this example because the paths to the `TinyORM` source and build folders are relative.
416
+
The exact [folders structure](building/tinyorm.mdx#folders-structure) is crucial in this example because the paths to the `TinyORM` source and build folders are relative.
416
417
:::
417
418
418
419
:::tip
@@ -440,21 +441,21 @@ Configuring with the `.qmake.conf` file has one big advantage that is that you d
440
441
### Build Hello world {#build-hello-world-qmake}
441
442
442
443
:::tip
443
-
I recommend creating a new `Session` in the `QtCreator IDE` as is described [here](building-tinyorm.mdx#open-qtcreator-ide).
444
+
I recommend creating a new `Session` in the `QtCreator IDE` as is described [here](building/tinyorm.mdx#open-qtcreator-ide).
444
445
:::
445
446
446
447
Now you can open the `HelloWorld.pro` project in the `QtCreator IDE`.
447
448
448
-
This will open the `Configure Project` tab, select some kit and update build folder paths to meet our [folders structure](building-tinyorm.mdx#folders-structure) or like you want.
449
+
This will open the `Configure Project` tab, select some kit and update build folder paths to meet our [folders structure](building/tinyorm.mdx#folders-structure) or like you want.
You are ready to configure build options, hit <kbd>Ctrl</kbd>+<kbd>5</kbd> to open `Project Settings` tab and select `Build` in the left sidebar to open the `Build Settings`, it should look similar to the following picture.
454
455
455
456
Disable `QML debugging and profiling` and `Qt Quick Compiler`, they are not used.
Everything is ready to build, you can press <kbd>Ctrl</kbd>+<kbd>b</kbd> to build the project.
@@ -465,7 +466,7 @@ The `QtCreator` takes care about all the necessary configuration, sets up the bu
465
466
466
467
Only one thing you might want to change is to run the `HelloWorld` example in the new terminal window. To do so, hit <kbd>Ctrl</kbd>+<kbd>5</kbd> to open the `Project Settings` tab and select `Run` in the left sidebar to open the `Run Settings`, then in the `Run` section select the `Run in terminal` checkbox.
467
468
468
-
Create a symbolic link to the `HelloWorld.sqlite3` database inside the build folder. If you do not have enabled symbolic links without `Administrator` rights on your `Windows`, you can just simply copy the `HelloWorld.sqlite3` database or [`Allow symbolic links unprivileged`](building-tinyorm.mdx#allow-symbolic-links-unprivileged).
469
+
Create a symbolic link to the `HelloWorld.sqlite3` database inside the build folder. If you do not have enabled symbolic links without `Administrator` rights on your `Windows`, you can just simply copy the `HelloWorld.sqlite3` database or [`Allow symbolic links unprivileged`](building/tinyorm.mdx#allow-symbolic-links-unprivileged).
Copy file name to clipboardexpand all lines: docs/building/migrations.mdx
+18-17
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
---
2
-
sidebar_position: 11
2
+
sidebar_position: 3
3
+
sidebar_label: Migrations
3
4
description: How to compile the TinyORM migrations (tom) c++ console application on Windows and Linux.
4
5
---
5
6
@@ -42,7 +43,7 @@ import {
42
43
43
44
We will try to create a working migrations console application called as <abbrtitle='TinyORM migrations'>`tom`</abbr> in the terminal with the `CMake` and in the `QtCreator` IDE with the `qmake`.
44
45
45
-
The `tom` console application also expects the following [folders structure](building-tinyorm.mdx#folders-structure), let's create them.
46
+
The `tom` console application also expects the following [folders structure](building/tinyorm.mdx#folders-structure), let's create them.
46
47
47
48
<TabsgroupId={shell}>
48
49
<TabItemvalue={pwsh}label={pwsh_label}>
@@ -69,11 +70,11 @@ All these three console applications the `tom` example, `tom` migrations for uni
69
70
70
71
Working MySQL database server as the `tom` migrations currently provides support only for the MySQL database.
71
72
72
-
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).
73
+
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).
73
74
74
75
### vcpkg.json manifest {#vcpkg-json-manifest}
75
76
76
-
Whole section about the `vcpkg` dependencies is described in the [Install dependencies](building-hello-world.mdx#install-dependencies).
77
+
Whole section about the `vcpkg` dependencies is described in the [Install dependencies](building/hello-world.mdx#install-dependencies).
77
78
78
79
Create a `vcpkg.json` file with the following content. `CMake` example below uses this method.
Now you are ready to configure `tom``CMake` application. Don't forget to prepare the build environment with the [`qtenv6.ps1`](building-tinyorm.mdx#windows-prerequisites) command if you are building with the `msvc`.
533
+
Now you are ready to configure `tom``CMake` application. Don't forget to prepare the build environment with the [`qtenv6.ps1`](building/tinyorm.mdx#windows-prerequisites) command if you are building with the `msvc`.
Do not forget to add `TinyOrm0d.dll` on the path on Windows and on the `LD_LIBRARY_PATH` on Linux, so `tom` application can find it during execution, as is described [here](building-tinyorm.mdx#tinyorm-on-path-cmake).
572
+
Do not forget to add `TinyOrm0d.dll` on the path on Windows and on the `LD_LIBRARY_PATH` on Linux, so `tom` application can find it during execution, as is described [here](building/tinyorm.mdx#tinyorm-on-path-cmake).
See also the [final thoughts](#finish) on how to verify the `tom` executable file properties.
@@ -676,7 +677,7 @@ unix:!macx: \
676
677
```
677
678
678
679
:::caution
679
-
The exact [folders structure](building-tinyorm.mdx#folders-structure) is crucial in this example because the paths to the `TinyORM` source and build folders are relative.
680
+
The exact [folders structure](building/tinyorm.mdx#folders-structure) is crucial in this example because the paths to the `TinyORM` source and build folders are relative.
680
681
:::
681
682
682
683
:::tip
@@ -730,21 +731,21 @@ HEADERS += \
730
731
### Build migrations {#build-migrations-qmake}
731
732
732
733
:::tip
733
-
I recommend creating a new `Session` in the `QtCreator IDE` as is described [here](building-tinyorm.mdx#open-qtcreator-ide).
734
+
I recommend creating a new `Session` in the `QtCreator IDE` as is described [here](building/tinyorm.mdx#open-qtcreator-ide).
734
735
:::
735
736
736
737
Now you can open the `tom.pro` project in the `QtCreator IDE`.
737
738
738
-
This will open the `Configure Project` tab, select some kit and update build folder paths to meet our [folders structure](building-tinyorm.mdx#folders-structure) or like you want.
739
+
This will open the `Configure Project` tab, select some kit and update build folder paths to meet our [folders structure](building/tinyorm.mdx#folders-structure) or like you want.
You are ready to configure build options, hit <kbd>Ctrl</kbd>+<kbd>5</kbd> to open `Project Settings` tab and select `Build` in the left sidebar to open the `Build Settings`, it should look similar to the following picture.
744
745
745
746
Disable `QML debugging and profiling` and `Qt Quick Compiler`, they are not used.
@@ -772,6 +773,6 @@ As the last thing, you can check that all the file properties were correctly set
772
773
773
774
Find the `tom.exe` file and press <kbd>Alt</kbd> + <kbd>Enter</kbd> to open the file properties. To check the executable manifest you can use eg. the [Resource Hacker](http://www.angusj.com/resourcehacker/).
Copy file name to clipboardexpand all lines: docs/building/tinyorm.mdx
+7-6
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
---
2
-
sidebar_position: 9
2
+
sidebar_position: 0
3
+
sidebar_label: TinyORM
3
4
hide_table_of_contents: true
4
5
description: How to compile the TinyORM c++ library on Windows and Linux.
5
6
---
@@ -90,7 +91,7 @@ Open `Local Security Policy`, go to `Local Policies - User Rights Assignment`, o
90
91
91
92
## Folders structure
92
93
93
-
All `tinyorm.org` examples are based on the following folders structure. The `tom` folder will contain a [migrations console application](building-migrations.mdx).
94
+
All `tinyorm.org` examples are based on the following folders structure. The `tom` folder will contain a [migrations console application](building/migrations.mdx).
@@ -471,7 +472,7 @@ As the last thing, do not forget to add `TinyOrm0d.dll` on the path on Windows a
471
472
</TabItem>
472
473
</Tabs>
473
474
474
-
Now you can try the [`HelloWorld CMake`](building-hello-world.mdx#hello-world-with-cmake) example.
475
+
Now you can try the [`HelloWorld CMake`](building/hello-world.mdx#hello-world-with-cmake) example.
475
476
476
477
## Building with qmake
477
478
@@ -548,19 +549,19 @@ Now you can open the `TinyOrm.pro` project in the `QtCreator IDE`.
548
549
549
550
This will open the `Configure Project` tab, select some kit and update build folder paths to meet our [folders structure](#folders-structure) or like you want.
You are ready to configure build options, hit <kbd>Ctrl</kbd>+<kbd>5</kbd> to open `Project Settings` tab and select `Build` in the left sidebar to open the `Build Settings`, it should look similar to the following picture.
555
556
556
557
Disable `QML debugging and profiling` and `Qt Quick Compiler`, they are not used.
If you want to change some `TinyORM` build options, you can pass them to the `Build Steps` - `qmake TinyOrm.pro` - `Additional arguments` input field. It can look like this.
Copy file name to clipboardexpand all lines: docs/database/getting-started.mdx
+5-4
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
---
2
-
sidebar_position: 3
2
+
sidebar_position: 0
3
+
sidebar_label: Getting Started
3
4
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.
4
5
---
5
6
@@ -13,7 +14,7 @@ description: TinyORM makes interacting with a database extremely simple using ra
13
14
14
15
## Introduction
15
16
16
-
Almost every modern application interacts with a database. TinyORM makes interacting with a database extremely simple using raw SQL, a [fluent query builder](query-builder.mdx), and the [TinyORM](tinyorm.mdx). Currently, TinyORM provides first-party support for three databases:
17
+
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:
17
18
18
19
- MySQL or MariaDB 5.0+ ([Version Policy](https://en.wikipedia.org/wiki/MySQL#Release_history))
0 commit comments