PythonQtWrapper_QSqlQuery.h
72 lines
| 3.4 KiB
| text/x-c
|
CLexer
florianlink
|
r13 | #ifndef PYTHONQTWRAPPER_QSQLQUERY_H | ||
#define PYTHONQTWRAPPER_QSQLQUERY_H | ||||
#include <qsqlquery.h> | ||||
#include <QObject> | ||||
florianlink
|
r24 | #include <PythonQt.h> | ||
florianlink
|
r13 | #include <QSize> | ||
#include <QSqlError> | ||||
#include <QSqlRecord> | ||||
#include <QStringList> | ||||
#include <QVariant> | ||||
#include <qsqldatabase.h> | ||||
#include <qsqldriver.h> | ||||
#include <qsqlerror.h> | ||||
#include <qsqlquery.h> | ||||
#include <qsqlrecord.h> | ||||
#include <qsqlresult.h> | ||||
class PythonQtWrapper_QSqlQuery : public QObject | ||||
{ Q_OBJECT | ||||
public: | ||||
Q_ENUMS(BatchExecutionMode ) | ||||
enum BatchExecutionMode{ | ||||
ValuesAsRows = QSqlQuery::ValuesAsRows, ValuesAsColumns = QSqlQuery::ValuesAsColumns}; | ||||
public slots: | ||||
QSqlQuery* new_QSqlQuery(QSqlDatabase db); | ||||
QSqlQuery* new_QSqlQuery(QSqlResult* r); | ||||
QSqlQuery* new_QSqlQuery(const QSqlQuery& other); | ||||
QSqlQuery* new_QSqlQuery(const QString& query = QString(), QSqlDatabase db = QSqlDatabase()); | ||||
void delete_QSqlQuery(QSqlQuery* obj) { delete obj; } | ||||
florianlink
|
r28 | bool exec(QSqlQuery* theWrappedObject); | ||
bool execBatch(QSqlQuery* theWrappedObject, QSqlQuery::BatchExecutionMode mode = QSqlQuery::ValuesAsRows); | ||||
florianlink
|
r13 | QVariant boundValue(QSqlQuery* theWrappedObject, int pos) const; | ||
QMap<QString , QVariant > boundValues(QSqlQuery* theWrappedObject) const; | ||||
florianlink
|
r28 | QSql::NumericalPrecisionPolicy numericalPrecisionPolicy(QSqlQuery* theWrappedObject) const; | ||
florianlink
|
r24 | int numRowsAffected(QSqlQuery* theWrappedObject) const; | ||
void bindValue(QSqlQuery* theWrappedObject, const QString& placeholder, const QVariant& val, QSql::ParamType type = QSql::In); | ||||
void clear(QSqlQuery* theWrappedObject); | ||||
bool previous(QSqlQuery* theWrappedObject); | ||||
florianlink
|
r28 | bool nextResult(QSqlQuery* theWrappedObject); | ||
QVariant boundValue(QSqlQuery* theWrappedObject, const QString& placeholder) const; | ||||
florianlink
|
r24 | void finish(QSqlQuery* theWrappedObject); | ||
florianlink
|
r28 | bool isNull(QSqlQuery* theWrappedObject, int field) const; | ||
florianlink
|
r24 | const QSqlResult* result(QSqlQuery* theWrappedObject) const; | ||
florianlink
|
r13 | QSqlError lastError(QSqlQuery* theWrappedObject) const; | ||
florianlink
|
r28 | int at(QSqlQuery* theWrappedObject) const; | ||
florianlink
|
r24 | bool isForwardOnly(QSqlQuery* theWrappedObject) const; | ||
bool next(QSqlQuery* theWrappedObject); | ||||
florianlink
|
r13 | bool prepare(QSqlQuery* theWrappedObject, const QString& query); | ||
florianlink
|
r28 | QString executedQuery(QSqlQuery* theWrappedObject) const; | ||
int size(QSqlQuery* theWrappedObject) const; | ||||
bool isValid(QSqlQuery* theWrappedObject) const; | ||||
bool last(QSqlQuery* theWrappedObject); | ||||
const QSqlDriver* driver(QSqlQuery* theWrappedObject) const; | ||||
bool exec(QSqlQuery* theWrappedObject, const QString& query); | ||||
QVariant value(QSqlQuery* theWrappedObject, int i) const; | ||||
QString lastQuery(QSqlQuery* theWrappedObject) const; | ||||
void setNumericalPrecisionPolicy(QSqlQuery* theWrappedObject, QSql::NumericalPrecisionPolicy precisionPolicy); | ||||
bool first(QSqlQuery* theWrappedObject); | ||||
bool isActive(QSqlQuery* theWrappedObject) const; | ||||
void setForwardOnly(QSqlQuery* theWrappedObject, bool forward); | ||||
bool seek(QSqlQuery* theWrappedObject, int i, bool relative = false); | ||||
bool isSelect(QSqlQuery* theWrappedObject) const; | ||||
QVariant lastInsertId(QSqlQuery* theWrappedObject) const; | ||||
void addBindValue(QSqlQuery* theWrappedObject, const QVariant& val, QSql::ParamType type = QSql::In); | ||||
void bindValue(QSqlQuery* theWrappedObject, int pos, const QVariant& val, QSql::ParamType type = QSql::In); | ||||
florianlink
|
r13 | QSqlRecord record(QSqlQuery* theWrappedObject) const; | ||
}; | ||||
#endif // PYTHONQTWRAPPER_QSQLQUERY_H | ||||