4 #include <TCriteriaConverter>
6 #include <TSystemGlobal>
23 bool load(
const QString &filename);
27 bool exec(
const QString &query);
68 it = qMin(
it + 1,
m->size());
180 QSqlRecord r = record();
189 return TCriteriaConverter<T>::getPropertyName(index, driver());
Const iterator.
Definition: tsqlqueryormapper.h:44
TSqlQueryORMapper< T > * m
Definition: tsqlqueryormapper.h:46
const T operator*() const
Definition: tsqlqueryormapper.h:58
bool operator!=(const ConstIterator &o) const
Definition: tsqlqueryormapper.h:65
bool operator==(const ConstIterator &o) const
Definition: tsqlqueryormapper.h:64
ConstIterator & operator++()
Definition: tsqlqueryormapper.h:66
int it
Definition: tsqlqueryormapper.h:47
ConstIterator & operator=(const ConstIterator &o)
Definition: tsqlqueryormapper.h:52
ConstIterator(const ConstIterator &o)
Definition: tsqlqueryormapper.h:50
ConstIterator()
Definition: tsqlqueryormapper.h:49
The TSqlQueryORMapper class is a template class that creates ORM objects by executing and manipulatin...
Definition: tsqlqueryormapper.h:18
TSqlQueryORMapper(int databaseId=0)
Constructs a TSqlQueryORMapper object using the SQL query and the database databaseId.
Definition: tsqlqueryormapper.h:82
TSqlQueryORMapper< T > & prepare(const QString &query)
Prepares the SQL query query to retrieve the ORM objects specified by the class T.
Definition: tsqlqueryormapper.h:89
QString fieldName(int index) const
Returns the name of the field at position index in the class T.
Definition: tsqlqueryormapper.h:187
bool next()
Definition: tsqlqueryormapper.h:170
bool exec()
Definition: tsqlqueryormapper.h:135
ConstIterator end()
Definition: tsqlqueryormapper.h:39
int numRowsAffected() const
Definition: tsqlqueryormapper.h:156
T value() const
Returns the current ORM object in the results retrieved by the query.
Definition: tsqlqueryormapper.h:177
ConstIterator begin()
Definition: tsqlqueryormapper.h:38
TSqlQueryORMapper< T > & addBind(const QVariant &val)
Definition: tsqlqueryormapper.h:120
TSqlQueryORMapper< T > & bind(const QString &placeholder, const QVariant &val)
Definition: tsqlqueryormapper.h:104
T execFirst()
Definition: tsqlqueryormapper.h:149
int size() const
Definition: tsqlqueryormapper.h:163
bool load(const QString &filename)
Definition: tsqlqueryormapper.h:97
The TSqlQuery class provides a means of executing and manipulating SQL statements.
Definition: tsqlquery.h:6
bool exec()
Executes a previously prepared SQL query.
Definition: tsqlquery.cpp:233
TSqlQuery & addBind(const QVariant &val)
Adds the value val to the list of values when using positional value binding and returns the query ob...
Definition: tsqlquery.cpp:307
int numRowsAffected() const
Returns the number of rows affected by the result's SQL statement, or -1 if it cannot be determined.
Definition: tsqlquery.h:56
TSqlQuery & prepare(const QString &query)
Prepares the SQL query query for execution.
Definition: tsqlquery.cpp:194
TSqlQuery & bind(const QString &placeholder, const QVariant &val)
Set the placeholder placeholder to be bound to value val in the prepared statement.
Definition: tsqlquery.cpp:261
bool load(const QString &filename)
Loads a query from the given file filename.
Definition: tsqlquery.cpp:50
int size() const
Returns the size of the result (number of rows returned), or -1 if the size cannot be determined or i...
Definition: tsqlquery.h:62
bool next()
Retrieves the next record in the result, if available, and positions the query on the retrieved recor...
Definition: tsqlquery.h:68
QSqlError lastError()
Returns the VariantMap object of the error status of the last operation.
Definition: tcachesqlitestore.cpp:26