QueryWrapper.
More...
#include <database.h>
|
QSqlQuery * | operator-> () noexcept |
| Returns a pointer to the underlying QSqlQuery instance.
|
|
void | operator<< (const char *text) noexcept |
| Appends the given text to the internal statement.
|
|
void | operator<< (const QString &text) noexcept |
| Appends the given text to the internal statement.
|
|
void | operator() () |
| Executes the query using the internal statement.
|
|
void | operator() (const QString &text) |
| Executes the query using the given statement.
|
|
QVariant | operator[] (const int idx) const noexcept |
| Returns the query value at the given index of the current record.
|
|
size_t | size () |
| Returns the number of records in the query result.
|
|
const QString & | dbName () const noexcept |
| Returns the name of the associated database.
|
|
QueryWrapper.
A wrapper around a QSqlQuery, associated with a database
◆ operator()() [1/2]
void QueryWrapper::operator() |
( |
| ) |
|
|
inline |
Executes the query using the internal statement.
Throws in case of failure
- Exceptions
-
◆ operator()() [2/2]
void QueryWrapper::operator() |
( |
const QString & | text | ) |
|
Executes the query using the given statement.
Throws in case of failure
- Exceptions
-
◆ size()
size_t QueryWrapper::size |
( |
| ) |
|
Returns the number of records in the query result.
Throws if the query cannot be restored at the initial position
- Exceptions
-
The documentation for this class was generated from the following files:
- logdoctor/modules/database/database.h
- logdoctor/modules/database/database.cpp