QSql Namespace
The QSql namespace holds identifiers that are used throughout Nt SQL. More…
| Header | #include <QSql> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Sql) |
| Module | Nt SQL C++ Classes |
Public Types
| enum | Location |
| enum | ParamTypeFlag |
| typedef | ParamType |
| enum | TableType |
| enum | NumericalPrecisionPolicy |
Detailed Description
Differences from Qt
None.
Member Type Documentation
enum QSql::Location
The special positions of a query, as returned by QSqlQuery::at().
| Constant | Description |
|---|---|
QSql::BeforeFirstRow | The query is positioned before the first row. |
QSql::AfterLastRow | The query is positioned after the last row. |
enum QSql::NumericalPrecisionPolicy
How numbers that do not fit a double without loss are returned. The SQLite driver stores what SQLite stores, a 64-bit integer or a double, so it accepts the policy and ignores it.
| Constant | Description |
|---|---|
QSql::LowPrecisionInt32 | Return a 32-bit integer. |
QSql::LowPrecisionInt64 | Return a 64-bit integer. |
QSql::LowPrecisionDouble | Return a double. This is the default. |
QSql::HighPrecision | Return a string that keeps every digit. |
typedef QSql::ParamType
The ParamType type is a typedef for QFlags<ParamTypeFlag>. It stores an OR combination of ParamTypeFlag values.
enum QSql::ParamTypeFlag
The kind of a value that is bound to a placeholder.
| Constant | Description |
|---|---|
QSql::In | The value is passed to the database. |
QSql::Out | The database writes the value. No driver of Nt has output parameters. |
QSql::InOut | The value is passed to the database, which may overwrite it. |
QSql::Binary | The value is binary data. This can be combined with the other values. |
enum QSql::TableType
The kinds of tables that QSqlDatabase::tables() lists.
| Constant | Description |
|---|---|
QSql::Tables | The tables that the user can see. |
QSql::SystemTables | The tables that the database uses internally. |
QSql::Views | The views that the user can see. |
QSql::AllTables | All of the above. |