QSqlQuery wrapper for DELETE FROM ... WHERE .. query execution.
More...
#include <EasyQtSql_DeleteQuery.h>
QSqlQuery wrapper for DELETE FROM ... WHERE .. query execution.
◆ DeleteQuery()
DeleteQuery::DeleteQuery |
( |
const QString & |
table, |
|
|
const QSqlDatabase & |
db |
|
) |
| |
|
inline |
◆ exec()
Executes unconditional DELETE FROM table query.
t.deleteFrom("table").exec();
◆ where() [1/3]
Executes conditional DELETE FROM table WHERE expr query.
t.deleteFrom("table").where("1=0");
◆ where() [2/3]
NonQueryResult DeleteQuery::where |
( |
const QString & |
expr, |
|
|
const QVariant & |
last |
|
) |
| |
|
inline |
Executes conditional DELETE FROM table WHERE expr query with parameter binding.
The method supports variable count of QVariant parameters. Parameters are bound with QSqlQuery::addBindValue.
t.deleteFrom("table").where("a=? AND b=?", 1, 2);
◆ where() [3/3]
template<typename... Rest>
NonQueryResult DeleteQuery::where |
( |
const QString & |
expr, |
|
|
const QVariant & |
first, |
|
|
const Rest &... |
rest |
|
) |
| |
|
inline |
The documentation for this class was generated from the following file: