CopperSpice API  1.9.1
QSql Namespace Reference

The QSql namespace contains miscellaneous identifiers used throughout the CsSql library. More...

Typedefs

using ParamType = QFlags< ParamTypeFlag >
 

Enums

enum  Location
 
enum  NumericalPrecisionPolicy
 
enum  ParamTypeFlag
 
enum  TableType
 

Detailed Description

The QSql namespace contains miscellaneous identifiers used throughout the CsSql library.

See also
CsSql library

Typedef Documentation

Typedef for QFlags<ParamTypeFlag>. It stores an OR combination of ParamTypeFlag values.

Enumeration Type Documentation

This enum type describes special SQL navigation locations:

ConstantValueDescription
QSql::BeforeFirstRow-1Before the first record.
QSql::AfterLastRow-2After the last record.
See also
QSqlQuery::at()

Numerical values in a database can have precisions greater than their corresponding C++ types. This enum lists the policies for representing such values in the application.

ConstantValueDescription
QSql::LowPrecisionInt320x01Force 32bit integer values. In case of floating point numbers, the fractional part is silently discarded.
QSql::LowPrecisionInt640x02Force 64bit integer values. In case of floating point numbers, the fractional part is silently discarded.
QSql::LowPrecisionDouble0x04Force double values. This is the default policy.
QSql::HighPrecision0Strings will be used to preserve precision.

Note: The actual behavior 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.

ConstantValueDescription
QSql::In0x00000001The bind parameter is used to put data into the database.
QSql::Out0x00000002The bind parameter is used to receive data from the database.
QSql::InOutIn | OutThe bind parameter is used to put data into the database; it will be overwritten with output data on executing a query.
QSql::Binary0x00000004This 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.

ConstantValueDescription
QSql::Tables0x01All the tables visible to the user.
QSql::SystemTables0x02Internal tables used by the database.
QSql::Views0x04All the views visible to the user.
QSql::AllTables0xffAll of the above.