Quark  0.1
SqlValueBinder Class Reference

A value binder for a QSqlQuery object. More...

#include <SqlValueBinder.h++>

Public Member Functions

 SqlValueBinder (QSqlQuery &query)
 Constructs a new SqlValueBinder for the given query. More...
 
 ~SqlValueBinder ()
 Destructor. More...
 
template<typename T >
SqlValueBinderoperator<< (const T &value)
 Binds a value to the next query parameter. More...
 
template<typename T >
SqlValueBinderoperator>> (T &value)
 Extracts a value from the next field in the results. More...
 
void reset ()
 Reset the SqlValueBinder. More...
 

Detailed Description

A value binder for a QSqlQuery object.

This class provides for convenient binding of values to consecutive query parameters through the chaining of the left-shift operator, and extraction of values in consecutive fields of query results through the chaining of the right-shift operator.

Constructor & Destructor Documentation

◆ SqlValueBinder()

SqlValueBinder ( QSqlQuery &  query)
inline

Constructs a new SqlValueBinder for the given query.

◆ ~SqlValueBinder()

~SqlValueBinder ( )
inline

Destructor.

Member Function Documentation

◆ operator<<()

SqlValueBinder& operator<< ( const T &  value)
inline

Binds a value to the next query parameter.

◆ operator>>()

SqlValueBinder& operator>> ( T &  value)
inline

Extracts a value from the next field in the results.

◆ reset()

void reset ( )
inline

Reset the SqlValueBinder.

The next binding/extraction will take place at the first parameter/field.


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