HFSQtLi 0.0.1
A Qt/C++ wrapper for SQLite3.
Public Member Functions | Public Attributes | Protected Member Functions | Friends | List of all members
HFSQtLi::Query Class Reference

Class that gives access to SQLite prepared statements (struct sqlite3_stmt) More...

#include <HFSQtLi.h>

Public Member Functions

template<typename T >
int readColumn (bool strict, int i, T &&value)
 
int readColumn (bool strict, int i, qint8 &value)
 
int readColumn (bool strict, int i, quint8 &value)
 
int readColumn (bool strict, int i, qint16 &value)
 
int readColumn (bool strict, int i, quint16 &value)
 
int readColumn (bool strict, int i, qint32 &value)
 
int readColumn (bool strict, int i, quint32 &value)
 
int readColumn (bool strict, int i, qint64 &value)
 
int readColumn (bool strict, int i, quint64 &value)
 
int readColumn (bool strict, int i, double &value)
 
int readColumn (bool strict, int i, float &value)
 
int readColumn (bool strict, int i, QString &value)
 
int readColumn (bool strict, int i, Blob &value)
 
int readColumn (bool strict, int i, QByteArray &value)
 
int readColumn (bool, int i, Value &result)
 
template<class T >
int readColumn (bool strict, int i, std::optional< T > &result)
 
template<class ... T>
int readColumn (bool strict, int i, Call< T... > &call)
 
template<class ... T>
int readColumn (bool strict, int i, Call< T... > &&call)
 
template<class ... T>
int readColumn (bool strict, int i, const Call< T... > &call)
 
template<unsigned I>
constexpr int readColumn (bool, int, const Helper::UnusedColumns< I > &)
 
template<unsigned I>
constexpr int readColumn (bool, int, Helper::UnusedColumns< I > &)
 
template<unsigned I>
constexpr int readColumn (bool, int, Helper::UnusedColumns< I > &&)
 
template<class ... Args>
int readColumn (bool strict, int i, const std::tuple< Args... > &values)
 
template<class ... Args>
int readColumn (bool strict, int i, std::tuple< Args... > &values)
 
template<class ... Args>
int readColumn (bool strict, int i, std::tuple< Args... > &&values)
 
template<class ... Args, int ... Index>
int readColumnHelper (bool strict, int i, std::tuple< Args... > &&values, Helper::int_sequence< Index... > seq)
 
template<class ... Args, int ... Index>
int readColumnHelper (bool strict, int i, const std::tuple< Args... > &values, Helper::int_sequence< Index... >)
 
template<class ... Args, int ... Index>
int readColumnHelper (bool strict, int i, std::tuple< Args... > &values, Helper::int_sequence< Index... > seq)
 
int readColumnInternal (int i, Blob &value, bool strict)
 
int clearBindingInternal ()
 
template<typename T >
bool bindTemporary (int i, const T &v)
 
template<typename T , typename... Args>
bool bindTemporary (int i, const T &v, const Args &...args)
 
void resetInternalError ()
 
void setInternalError (int code, const char *explicitMessag=nullptr)
 
Constructors
 Query (Db *db, const char *query, bool persistent=false, bool storeErrorMsg=false, const char **tail=nullptr)
 Construct a query prepared from a string. More...
 
 Query (Db *db, const QString &query, bool persistent=false, bool storeErrorMsg=false, QString *tail=nullptr)
 Construct a query from a QString. More...
 
 Query (Db *db=nullptr, bool storeErrorMsg=true)
 Construct a non prepared query. More...
 
 Query (const Query &)=delete
 
General functions
bool prepare (const QString &query, bool persistent=true, QString *tail=nullptr)
 Prepares a query. More...
 
bool prepare (const char *query, bool persistent=true, const char **tail=nullptr)
 Prepares a query. More...
 
bool stepNoFetch ()
 Move to next row in a query but do not fetch any data. More...
 
bool reset ()
 Resets the query. More...
 
bool clearBindings ()
 Clear the bounded values of a query. More...
 
bool finalize ()
 Finalizes a query. Query will have to be prepared again before being able to execute it again. More...
 
int error (QString *errorMsg=nullptr)
 Returns the SQLite error code of last function. More...
 
bool isOk ()
 Checks if last function call was sucessfull. More...
 
bool isDone ()
 Checks if last function call was the last step of a query. More...
 
QString errorMsg () const
 Gets the error message string. More...
 
bool isPrepared ()
 Check if the query contains a valid prepared statement. More...
 
bool isDbValid ()
 Check if the query is associated with a valid and open database. More...
 
void setKeepErrorMsg (bool newKeepErrorMsg)
 Changes the mode of retrival of error string. If keep error message is true the exact error string returned by sqlite is fetches, otherwise the error message returned will be a generic one depending on the error code. More...
 
bool keepErrorMsg () const
 Gets the keep error message status. More...
 
Step-and-fetch functions

All the function in this group advances the query to the next row and if this operation is successfull fetches some or all of its data. They are approximately equivalent to calling:

stepNoFetch() && columnXXX(args...);
bool stepNoFetch()
Move to next row in a query but do not fetch any data.
Definition: HFSQtLi.cpp:221


template<typename... Args>
int stepPartial (int index, Args &&... args)
 Performs a step on a query and fetches data after the step. More...
 
template<typename... Args>
int step (Args &&... args)
 Performs a step on a query and fetches all the data. More...
 
template<typename... Args>
int stepGeneric (bool strict, int index, Args &&... args)
 Performs a step on a query and fetches data after the step with optional enabling of type checking (strict mode) More...
 
template<typename... Args>
int stepAllGeneric (bool strict, Args &&... args)
 Performs a step on a query and fetches all the data after the step with optional enabling of type checking (strict mode) More...
 
Single row query execution

The following function allows easy operation on any query that returns one and only one row. They perform in one operation binding of parameters, a step on first row, fetching the data of the row and a second step to check the query effetively returned only one row. For example:

int x;
qry.executeSingle<1>(4, x);

Is more or less equivalent to:

qry.bind(4) && qry.step() && qry.columnAll(x) && "qry.step() returns SQLITE3_DONE"

Note All the function in this group will return an error if the query returns no row or more than one row

template<typename... Args>
int executeSinglePartial (int index, Args &&... args)
 Execute a query returning just one row and fetches some of the returned data. More...
 
template<typename... Args>
int executeSingle (Args &&... args)
 Execute a query returning just one row and fetches all of the returned data. More...
 
template<int I, typename... Args>
int executeSinglePartial (int indexBind, int indexFetch, Args &&... args)
 Execute a query returning just one row and fetches some of the returned data. More...
 
template<int I, typename... Args>
int executeSingle (Args &&... args)
 Execute a query returning just one row and fetches all of the returned data. More...
 
template<typename... Args>
int executeSinglePartialStrict (int index, Args &&... args)
 Execute a query returning just one row and fetches some of the returned data checking data types. More...
 
template<typename... Args>
int executeSingleStrict (Args &&... args)
 Execute a query returning just one row and fetches all of the returned data checking data types. More...
 
template<int I, typename... Args>
int executeSinglePartialStrict (int indexBind, int indexFetch, Args &&... args)
 Execute a query returning just one row and fetches some of the returned data checking data types. More...
 
template<int I, typename... Args>
int executeSingleStrict (Args &&... args)
 Execute a query returning just one row and fetches all of the returned data checking data types. More...
 
template<int I, typename... Args>
int executeSingleGeneric (bool strict, int indexBind, int indexFetch, Args &&... args)
 Execute a query returning just one row and fetches some of the returned data. More...
 
template<int I, typename... Args>
int executeSingleAllGeneric (bool strict, Args &&... args)
 Execute a query returning just one row and fetches all of the returned data. More...
 
Commands query execution

The following function allows easy operation on any query that returns no row (e.g. CREATE TABLE or DELETE) They perform in one operation binding of parameters, and a step to run a query, checking that effectively the query returns no rows For example:

qry.execute(4);

Is more or less equivalent to:

qry.bind(4) && "qry.step() returns SQLITE3_DONE"

Note All the function in this group will return an error if the query returns any row.

template<typename... Args>
int executeCommand (Args &&... args)
 Executes a query returning no rows. More...
 
Functions to bind data

The functions here can be used to bind arguments while the query is in a reset state. For arguments see Bounded data types .

template<typename... Args>
int bind (int i, Args &&...args)
 Binds some values in a query. More...
 
template<typename... Args>
int bindAll (Args &&...args)
 Binds all values of a query. More...
 
template<typename... Args>
int bindTemporary (int i, Args &&...args)
 Binds some values in a query. The existence of passed values must be guaranteed to persist until the binding is cleared (Query is destroyed or clearBindings() is called) More...
 
template<typename... Args>
int bindTemporaryAll (Args &&...args)
 Binds all values. The existence of passed values must be guaranteed to persist until the binding is cleared (Query is destroyed or clearBindings() is called) More...
 
Functions to fetch data

The functions here can be used to retrived data while a query is currently pointing to a row. For a description of types accepted see Fetched data types .

template<typename... Args>
int column (int i, Args &&...args)
 Retrieves some columns from a row. More...
 
template<typename... Args>
int columnStrict (int i, Args &&...args)
 Retrieves some columns from a row, returning error if types do not match. More...
 
template<typename... Args>
int columnAll (Args &&...args)
 Retrieves all columns from a row. If the number of retrived columns does not match the columns returned by the query the function returns an error. More...
 
template<typename... Args>
int columnStrictAll (Args &&...args)
 Retrieves all columns from a row, returning error if types do not match. More...
 

Public Attributes

Db * m_db
 
sqlite3_stmt * m_stmt
 
int m_error
 
QString m_errorMsg
 
bool m_keepErrorMsg
 

Protected Member Functions

template<typename... Args>
int bindSingleWithChecks (bool temporary, int i, const std::tuple< Args... > &args)
 
bool fetchErrorString ()
 
void forceFetchErrorString ()
 
int assertBindColumnCount (int i)
 
template<typename T >
int bindSingle (bool, int i, T &&value)
 
int bindSingle (bool, int i, std::nullptr_t)
 
int bindSingle (bool temporary, int i, QByteArray &&value)
 
int bindSingle (bool temporary, int i, QByteArray &value)
 
int bindSingle (bool, int i, const QByteArray &value)
 
int bindSingle (bool temporary, int i, Null &&)
 
int bindSingle (bool temporary, int i, const Null &)
 
int bindSingle (bool temporary, int i, Null &)
 
int bindSingle (bool temporary, int i, ZeroBlob &&value)
 
int bindSingle (bool temporary, int i, ZeroBlob &value)
 
int bindSingle (bool, int i, const ZeroBlob &zeroBlob)
 
int bindSingle (bool, int i, qint64 value)
 
int bindSingle (bool, int i, double value)
 
int bindSingle (bool, int i, const char *value, int len=-1)
 
int bindSingle (bool temporary, int i, int value)
 
int bindSingle (bool temporary, int i, unsigned value)
 
int bindSingle (bool temporary, int i, const QString &value)
 
template<class ... T>
int bindSingle (bool temporary, int i, const std::tuple< T... > &value)
 
template<class ... T>
int bindSingle (bool temporary, int i, std::tuple< T... > &&value)
 
template<class ... T, int ... I>
int bindSingleHelper (bool temporary, int i, const std::tuple< T... > &value, Helper::int_sequence< I... >)
 
Type columnType (int i)
 
int assertFetchColumnCount (int i)
 
template<typename... Args>
int columnHelper (bool strict, int i, Args &&...args)
 
template<typename... Args>
int columnAllHelper (bool strict, Args &&...args)
 
qint64 readColumnIntSQLite (int i, bool &ok)
 
double readColumnDoubleSQLite (int i, bool &ok)
 
template<class T >
int readColumnInt (bool strict, int i, T &value)
 

Friends

class SqliteDb
 
class CustomBind
 
class CustomFetch
 

Detailed Description

Class that gives access to SQLite prepared statements (struct sqlite3_stmt)

Constructor & Destructor Documentation

◆ Query() [1/3]

Query::Query ( Db *  db,
const char *  query,
bool  persistent = false,
bool  storeErrorMsg = false,
const char **  tail = nullptr 
)

Construct a query prepared from a string.

Parameters
dbThe database on which creating the query
queryQuery to perform
persistentSee SQLite documentation
storeErrorMsgIf true the string with the error message will be stored.
tailThe part of the query that was not used

◆ Query() [2/3]

Query::Query ( Db *  db,
const QString &  query,
bool  persistent = false,
bool  storeErrorMsg = false,
QString *  tail = nullptr 
)

Construct a query from a QString.

Parameters
dbThe database on which creating the query
queryQuery to perform
persistentSee SQLite documentation
storeErrorMsgIf true the string with the error message will be stored.
tailThe part of the query that was not used

◆ Query() [3/3]

Query::Query ( Db *  db = nullptr,
bool  storeErrorMsg = true 
)

Construct a non prepared query.

Parameters
dbThe database on which creating the query
storeErrorMsgIf true the string with the error message will be stored.

Member Function Documentation

◆ bind()

template<typename... Args>
int HFSQtLi::Query::bind ( int  i,
Args &&...  args 
)
inline

Binds some values in a query.

Parameters
iFirst index to bind (1-based)
argsValues to bind (see Bounded data types)
Returns
0 on error, 1+number of bound columns on success

◆ bindAll()

template<typename... Args>
int HFSQtLi::Query::bindAll ( Args &&...  args)
inline

Binds all values of a query.

Parameters
argsValues to bind (see Bounded data types)
Returns
0 on error, 1+number of bound columns on success

◆ bindTemporary()

template<typename... Args>
int HFSQtLi::Query::bindTemporary ( int  i,
Args &&...  args 
)
inline

Binds some values in a query. The existence of passed values must be guaranteed to persist until the binding is cleared (Query is destroyed or clearBindings() is called)

Parameters
iFirst index to bind (1-based)
argsValues to bind (see Bounded data types)
Returns
0 on error, 1+number of bound columns on success

◆ bindTemporaryAll()

template<typename... Args>
int HFSQtLi::Query::bindTemporaryAll ( Args &&...  args)
inline

Binds all values. The existence of passed values must be guaranteed to persist until the binding is cleared (Query is destroyed or clearBindings() is called)

Parameters
argsValues to bind (see Bounded data types)
Returns
0 on error, 1+number of bound columns on success

◆ clearBindings()

bool Query::clearBindings ( )

Clear the bounded values of a query.

Returns
True on success

◆ column()

template<typename... Args>
int HFSQtLi::Query::column ( int  i,
Args &&...  args 
)
inline

Retrieves some columns from a row.

Parameters
iIndex of the first colum to fetch (0-based)
argsReference to data to retrive (see Fetched data types)
Returns
0 on error, 1+number of fetched columns on success

◆ columnAll()

template<typename... Args>
int HFSQtLi::Query::columnAll ( Args &&...  args)
inline

Retrieves all columns from a row. If the number of retrived columns does not match the columns returned by the query the function returns an error.

Parameters
argsReference to data to retrive (see Fetched data types)
Returns
0 on error, 1+number of fetched columns on success

◆ columnStrict()

template<typename... Args>
int HFSQtLi::Query::columnStrict ( int  i,
Args &&...  args 
)
inline

Retrieves some columns from a row, returning error if types do not match.

Parameters
iIndex of the first colum to fetch (0-based)
argsReference to data to retrive (see Fetched data types)
Returns
0 on error, 1+number of fetched columns on success

◆ columnStrictAll()

template<typename... Args>
int HFSQtLi::Query::columnStrictAll ( Args &&...  args)
inline

Retrieves all columns from a row, returning error if types do not match.

Parameters
argsReference to data to retrive (see Fetched data types)
Returns
0 on error, 1+number of fetched columns on success

◆ error()

int Query::error ( QString *  errorMsg = nullptr)

Returns the SQLite error code of last function.

Parameters
errorMsgIf non-null the string will be set with error message from last function
Returns
The error code of last function

◆ errorMsg()

QString Query::errorMsg ( ) const

Gets the error message string.

Returns
The error message string. It may be empty if last execution was successfull (e.g. SQLITE3_DONE or SQLITE3_OK)

◆ executeCommand()

template<typename... Args>
int HFSQtLi::Query::executeCommand ( Args &&...  args)
inline

Executes a query returning no rows.

Parameters
argsValues to bind (see Bounded data types)
Returns
0 on error, 1+number of bound values on error
Warning
Data is bound in temporary mode and resetBindings() is called before returning

◆ executeSingle() [1/2]

template<typename... Args>
int HFSQtLi::Query::executeSingle ( Args &&...  args)
inline

Execute a query returning just one row and fetches all of the returned data.

Parameters
INumber of parameters to bind
strictTrue if the data of the types should be checked
argsFirst I arguments are the values to bind (see Bounded data types), the ones after that are references to data to retrive (see Fetched data types)
Returns
0 on error, 1+number of fetched columns on success
Warning
Data is bound in temporary mode and resetBindings() is called before returning

◆ executeSingle() [2/2]

template<int I, typename... Args>
int HFSQtLi::Query::executeSingle ( Args &&...  args)
inline

Execute a query returning just one row and fetches all of the returned data.

Parameters
INumber of parameters to bind
strictTrue if the data of the types should be checked
argsFirst I arguments are the values to bind (see Bounded data types), the ones after that are references to data to retrive (see Fetched data types)
Returns
0 on error, 1+number of fetched columns on success
Warning
Data is bound in temporary mode and resetBindings() is called before returning

◆ executeSingleAllGeneric()

template<int I, typename... Args>
int HFSQtLi::Query::executeSingleAllGeneric ( bool  strict,
Args &&...  args 
)

Execute a query returning just one row and fetches all of the returned data.

Parameters
INumber of parameters to bind
strictTrue if the data of the types should be checked
argsFirst I arguments are the values to bind (see Bounded data types), the ones after that are references to data to retrive (see Fetched data types)
Returns
0 on error, 1+number of fetched columns on success
Warning
Data is bound in temporary mode and resetBindings() is called before returning

◆ executeSingleGeneric()

template<int I, typename... Args>
int HFSQtLi::Query::executeSingleGeneric ( bool  strict,
int  indexBind,
int  indexFetch,
Args &&...  args 
)

Execute a query returning just one row and fetches some of the returned data.

Parameters
INumber of parameters to bind
strictTrue if the data of the types should be checked
indexBindIndex of data to bind (1-based)
indexFetchIndex of data to fetch (0-based)
argsFirst I arguments are the values to bind (see Bounded data types), the ones after that are references to data to retrive (see Fetched data types)
Returns
0 on error, 1+number of fetched columns on success

◆ executeSinglePartial() [1/2]

template<typename... Args>
int HFSQtLi::Query::executeSinglePartial ( int  index,
Args &&...  args 
)
inline

Execute a query returning just one row and fetches some of the returned data.

Parameters
INumber of parameters to bind
strictTrue if the data of the types should be checked
indexBindIndex of data to bind (1-based)
indexFetchIndex of data to fetch (0-based)
argsFirst I arguments are the values to bind (see Bounded data types), the ones after that are references to data to retrive (see Fetched data types)
Returns
0 on error, 1+number of fetched columns on success
Parameters
indexIndex of data to fetch (0-based)

◆ executeSinglePartial() [2/2]

template<int I, typename... Args>
int HFSQtLi::Query::executeSinglePartial ( int  indexBind,
int  indexFetch,
Args &&...  args 
)
inline

Execute a query returning just one row and fetches some of the returned data.

Parameters
INumber of parameters to bind
strictTrue if the data of the types should be checked
indexBindIndex of data to bind (1-based)
indexFetchIndex of data to fetch (0-based)
argsFirst I arguments are the values to bind (see Bounded data types), the ones after that are references to data to retrive (see Fetched data types)
Returns
0 on error, 1+number of fetched columns on success

◆ executeSinglePartialStrict() [1/2]

template<typename... Args>
int HFSQtLi::Query::executeSinglePartialStrict ( int  index,
Args &&...  args 
)
inline

Execute a query returning just one row and fetches some of the returned data checking data types.

Parameters
indexIndex of data to fetch (0-based)
INumber of parameters to bind
strictTrue if the data of the types should be checked
indexBindIndex of data to bind (1-based)
indexFetchIndex of data to fetch (0-based)
argsFirst I arguments are the values to bind (see Bounded data types), the ones after that are references to data to retrive (see Fetched data types)
Returns
0 on error, 1+number of fetched columns on success

◆ executeSinglePartialStrict() [2/2]

template<int I, typename... Args>
int HFSQtLi::Query::executeSinglePartialStrict ( int  indexBind,
int  indexFetch,
Args &&...  args 
)
inline

Execute a query returning just one row and fetches some of the returned data checking data types.

Parameters
indexIndex of data to fetch (0-based)
INumber of parameters to bind
strictTrue if the data of the types should be checked
indexBindIndex of data to bind (1-based)
indexFetchIndex of data to fetch (0-based)
argsFirst I arguments are the values to bind (see Bounded data types), the ones after that are references to data to retrive (see Fetched data types)
Returns
0 on error, 1+number of fetched columns on success

◆ executeSingleStrict() [1/2]

template<typename... Args>
int HFSQtLi::Query::executeSingleStrict ( Args &&...  args)
inline

Execute a query returning just one row and fetches all of the returned data checking data types.

Parameters
INumber of parameters to bind
strictTrue if the data of the types should be checked
argsFirst I arguments are the values to bind (see Bounded data types), the ones after that are references to data to retrive (see Fetched data types)
Returns
0 on error, 1+number of fetched columns on success
Warning
Data is bound in temporary mode and resetBindings() is called before returning

◆ executeSingleStrict() [2/2]

template<int I, typename... Args>
int HFSQtLi::Query::executeSingleStrict ( Args &&...  args)
inline

Execute a query returning just one row and fetches all of the returned data checking data types.

Parameters
INumber of parameters to bind
strictTrue if the data of the types should be checked
argsFirst I arguments are the values to bind (see Bounded data types), the ones after that are references to data to retrive (see Fetched data types)
Returns
0 on error, 1+number of fetched columns on success
Warning
Data is bound in temporary mode and resetBindings() is called before returning

◆ finalize()

bool Query::finalize ( )

Finalizes a query. Query will have to be prepared again before being able to execute it again.

Returns
True on success.

◆ isDbValid()

bool HFSQtLi::Query::isDbValid ( )
inline

Check if the query is associated with a valid and open database.

Returns
True if the database associated to this query is valid and open

◆ isDone()

bool Query::isDone ( )

Checks if last function call was the last step of a query.

Returns
True if last function call returned SQLITE3_DONE.

◆ isOk()

bool Query::isOk ( )

Checks if last function call was sucessfull.

Returns
True if last function call was successfull.

◆ isPrepared()

bool HFSQtLi::Query::isPrepared ( )
inline

Check if the query contains a valid prepared statement.

Returns
True if the query is a valid prepared statement

◆ keepErrorMsg()

bool Query::keepErrorMsg ( ) const

Gets the keep error message status.

Returns
Value of error message status

◆ prepare() [1/2]

bool Query::prepare ( const char *  query,
bool  persistent = true,
const char **  tail = nullptr 
)

Prepares a query.

Parameters
queryQuery to be run
persistentSee SQLite documentation
tailThe part of the query that was not used
Returns
True on success

◆ prepare() [2/2]

bool Query::prepare ( const QString &  query,
bool  persistent = true,
QString *  tail = nullptr 
)

Prepares a query.

Parameters
queryQuery to be run
persistentSee SQLite documentation
tailThe part of the query that was not used
Returns
True on success

◆ reset()

bool Query::reset ( )

Resets the query.

Returns
True on success

◆ setKeepErrorMsg()

void Query::setKeepErrorMsg ( bool  newKeepErrorMsg)

Changes the mode of retrival of error string. If keep error message is true the exact error string returned by sqlite is fetches, otherwise the error message returned will be a generic one depending on the error code.

Parameters
newKeepErrorMsgValue to set

◆ step()

template<typename... Args>
int HFSQtLi::Query::step ( Args &&...  args)
inline

Performs a step on a query and fetches all the data.

Parameters
argsList of reference to variables that will be filled with columns data
Returns
Zero on error or 1+number of fetched columns on success

◆ stepAllGeneric()

template<typename... Args>
int HFSQtLi::Query::stepAllGeneric ( bool  strict,
Args &&...  args 
)
inline

Performs a step on a query and fetches all the data after the step with optional enabling of type checking (strict mode)

Parameters
strictTrue if a strict fetch should be performed
argsList of reference to variables that will be filled with columns data
Returns
Zero on error or 1+number of fetched columns on success

◆ stepGeneric()

template<typename... Args>
int HFSQtLi::Query::stepGeneric ( bool  strict,
int  index,
Args &&...  args 
)
inline

Performs a step on a query and fetches data after the step with optional enabling of type checking (strict mode)

Parameters
strictTrue if a strict fetch should be performed
indexThe index of the first column to retrive (0 is the first column)
argsList of reference to variables that will be filled with columns starting at index
Returns
Zero on error or 1+number of fetched columns on success

◆ stepNoFetch()

bool Query::stepNoFetch ( )

Move to next row in a query but do not fetch any data.

Returns
True on success

◆ stepPartial()

template<typename... Args>
int HFSQtLi::Query::stepPartial ( int  index,
Args &&...  args 
)
inline

Performs a step on a query and fetches data after the step.

Parameters
indexThe index of the first column to retrive (0 is the first column)
argsList of reference to variables that will be filled with columns starting at index
Returns
Zero on error or 1+number of fetched columns on success

The documentation for this class was generated from the following files: