|
HFSQtLi 0.0.1
A Qt/C++ wrapper for SQLite3.
|
Accessor passed to custom data type fetch An instance of this class will be passed as first parameter to customFetch functions (See Custom data types). More...
#include <HFSQtLi.h>
Public Member Functions | |
| template<class ... T> | |
| int | fetch (T &&...value) |
| Fetches some values This function is roughly equivalent to calling Query::column. It will fetchone or more values. Note that the function will start fetch from the column following the last fetched column. E.g. in: More... | |
| template<class ... T> | |
| int | fetchIndex (bool strict, int i, T &&...value) |
| Fetches some values This function is roughly equivalent to calling Query::column. It will fetch one or more values. Note that the function will start fetchin from the column following the last column fetched by the query. E.g. in: More... | |
| constexpr int | numFetched () |
| Gets the number of columns fetched so far by this custom accessor. Number of fetched column is defined as the maximum column index fetched minus the first column index associated with the accessor plus one. If no column has yet be fetched returns 0. More... | |
Protected Member Functions | |
| constexpr | CustomFetch (Query *query, bool strict, int base) |
Protected Attributes | |
| Query * | m_query |
| bool | m_strict |
| int | m_base |
| int | m_fetched |
Friends | |
| class | Query |
Accessor passed to custom data type fetch An instance of this class will be passed as first parameter to customFetch functions (See Custom data types).
The function will be able to use it to bind the columns with value from the object given as second parameter.
Example usage:
|
inline |
Fetches some values This function is roughly equivalent to calling Query::column. It will fetchone or more values. Note that the function will start fetch from the column following the last fetched column. E.g. in:
| value | Is a list of references to fetch |
|
inline |
Fetches some values This function is roughly equivalent to calling Query::column. It will fetch one or more values. Note that the function will start fetchin from the column following the last column fetched by the query. E.g. in:
| i | 1-based index of first column to bind. Note that the 0 column is the one currently binding |
| value | Is a list of objects to bind |
|
inlineconstexpr |
Gets the number of columns fetched so far by this custom accessor. Number of fetched column is defined as the maximum column index fetched minus the first column index associated with the accessor plus one. If no column has yet be fetched returns 0.