|
HFSQtLi 0.0.1
A Qt/C++ wrapper for SQLite3.
|
This section describes the data types that are handled by the bounding functions (e.g. Query::bind, Db::executeSingle<N>, ...). Bounding function exists with a standard and a temporary version. They behave exactly the same except that the lifetime of QString and QByteArray bounded with temporary versions are guaranteed to extend until the Query will be destroyed or reset. They are mainly used for optimizing calls in executeSingle.
Following types are directly mapped to sqlite_bind_X calls
The following types are handled natively:
Note: as SQLite stores only 64 bit signed integers the results of operations on 64 bit unsigned with the most signficant bit set is undefined
The following types are handled natively:
The following types are handled natively:
Note that when using temporary version the passed variables must be guaranteed to exists for all the time they will be bound (that is until destruction of the query or a call to resetAllBindings)
If the bound value is empty than this is equivalent to NULL, othewise the value will be bound as if directly passing a type T.
If the bound data is a tuple then the data is retrived as if each element of the tuple was bound consecutevely.
E.g.
is equivalent to
Nulls can be bound in two ways:
Passing a ZeroBlob will bind an empty blob with the passed size. Mapped to a sqlite3_bind_zeroblob64 call.
It is possible to handle the binding of any data type T by implementing one of the following functions:
This function will have to use the passed accessor to bind the needed column(s) using data