mirror of
https://github.com/silverqx/TinyORM.git
synced 2026-02-08 19:39:11 -06:00
docs unified links to Qt's documentation
Used the /qt/ instead of specific versions, eg. /qt-5/xyz.
This commit is contained in:
@@ -33,7 +33,7 @@ Almost every modern application interacts with a database. TinyORM makes interac
|
||||
- PostgreSQL 11+ ([Version Policy](https://www.postgresql.org/support/versioning/))
|
||||
- SQLite 3.8.8+
|
||||
|
||||
TinyORM internally uses `QtSql` module, you can look for [supported databases](https://doc.qt.io/qt-5/sql-driver.html#supported-databases).
|
||||
TinyORM internally uses `QtSql` module, you can look for [supported databases](https://doc.qt.io/qt/sql-driver.html#supported-databases).
|
||||
|
||||
:::note
|
||||
TinyORM's code is ready and designed to simply add support for the SQL Server.
|
||||
@@ -69,7 +69,7 @@ You can create and configure new database connection by `create` method provided
|
||||
|
||||
The first argument is configuration hash which is of type `QVariantHash` and the second argument specifies the name of the *connection*, this connection will also be a *default connection*. You can configure multiple database connections at once and choose the needed one before executing SQL query, section [Using Multiple Database Connections](#using-multiple-database-connections) describes how to create and use multiple database connections.
|
||||
|
||||
You may also configure connection options by `options` key as `QVariantHash` or `QString`, you can pass any [connection options](https://doc.qt.io/qt-5/qsqldatabase.html#setConnectOptions) supported by `QSqlDatabase`.
|
||||
You may also configure connection options by `options` key as `QVariantHash` or `QString`, you can pass any [connection options](https://doc.qt.io/qt/qsqldatabase.html#setConnectOptions) supported by `QSqlDatabase`.
|
||||
|
||||
You can also configure [Transaction Isolation Levels](https://dev.mysql.com/doc/refman/8.0/en/innodb-transaction-isolation-levels.html) for MySQL connection with the `isolation_level` configuration option.
|
||||
|
||||
|
||||
@@ -404,7 +404,7 @@ The `refresh` method will re-hydrate the existing model using fresh data from th
|
||||
|
||||
### Containers
|
||||
|
||||
As we have seen, TinyORM methods like `all` and `get` retrieve multiple records from the database. Since these methods return a `QVector<Model>`, you can iterate it like any other container with the [Range-based for loop](https://en.cppreference.com/w/cpp/language/range-for), [STL-Style Iterators](https://doc.qt.io/qt-5/containers.html#stl-style-iterators), [Java-Style Iterators](https://doc.qt.io/qt-5/containers.html#java-style-iterators) or [Ranges](https://www.walletfox.com/course/quickref_range_v3.php).
|
||||
As we have seen, TinyORM methods like `all` and `get` retrieve multiple records from the database. Since these methods return a `QVector<Model>`, you can iterate it like any other container with the [Range-based for loop](https://en.cppreference.com/w/cpp/language/range-for), [STL-Style Iterators](https://doc.qt.io/qt/containers.html#stl-style-iterators), [Java-Style Iterators](https://doc.qt.io/qt/containers.html#java-style-iterators) or [Ranges](https://www.walletfox.com/course/quickref_range_v3.php).
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user