QSql Namespace Reference |
enum | Location { BeforeFirstRow, AfterLastRow } |
enum | NumericalPrecisionPolicy { LowPrecisionInt32, LowPrecisionInt64, LowPrecisionDouble, HighPrecision } |
flags | ParamType |
enum | ParamTypeFlag { In, Out, InOut, Binary } |
enum | TableType { Tables, SystemTables, Views, AllTables } |
The QSql namespace contains miscellaneous identifiers used throughout the Qt SQL library.
See also QtSql Module.
This enum type describes special SQL navigation locations:
Constant | Value | Description |
---|---|---|
QSql::BeforeFirstRow | -1 | Before the first record. |
QSql::AfterLastRow | -2 | After the last record. |
See also QSqlQuery::at().
This enum type describes at which precision levels numercial values are read from a database.
Some databases support numerical values with a precision that is not storable in a C++ basic data type. The default behavior is to bind these values as a QString. This enum can be used to override this behavior.
Constant | Value | Description |
---|---|---|
QSql::LowPrecisionInt32 | 0x01 | Force 32bit integer values. In case of floating point numbers, the fractional part is silently discarded. |
QSql::LowPrecisionInt64 | 0x02 | Force 64bit integer values. In case of floating point numbers, the fractional part is silently discarded. |
QSql::LowPrecisionDouble | 0x04 | Force double values. |
QSql::HighPrecision | 0 | The default behavior - try to preserve maximum precision. |
Note: The actual behaviour if an overflow occurs is driver specific. The Oracle database just returns an error in this case.
This enum is used to specify the type of a bind parameter.
Constant | Value | Description |
---|---|---|
QSql::In | 0x00000001 | The bind parameter is used to put data into the database. |
QSql::Out | 0x00000002 | The bind parameter is used to receive data from the database. |
QSql::InOut | In | Out | The bind parameter is used to put data into the database; it will be overwritten with output data on executing a query. |
QSql::Binary | 0x00000004 | This must be OR'd with one of the other flags if you want to indicate that the data being transferred is raw binary data. |
The ParamType type is a typedef for QFlags<ParamTypeFlag>. It stores an OR combination of ParamTypeFlag values.
This enum type describes types of SQL tables.
Constant | Value | Description |
---|---|---|
QSql::Tables | 0x01 | All the tables visible to the user. |
QSql::SystemTables | 0x02 | Internal tables used by the database. |
QSql::Views | 0x04 | All the views visible to the user. |
QSql::AllTables | 0xff | All of the above. |
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.6 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com