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
|
r73 | QSqlRecord record(QSqlQuery* theWrappedObject) const; | ||
florianlink
|
r28 | bool exec(QSqlQuery* theWrappedObject); | ||
florianlink
|
r73 | QVariant lastInsertId(QSqlQuery* theWrappedObject) const; | ||
florianlink
|
r28 | bool nextResult(QSqlQuery* theWrappedObject); | ||
florianlink
|
r73 | void addBindValue(QSqlQuery* theWrappedObject, const QVariant& val, QSql::ParamType type = QSql::In); | ||
florianlink
|
r28 | QVariant boundValue(QSqlQuery* theWrappedObject, const QString& placeholder) const; | ||
florianlink
|
r73 | void bindValue(QSqlQuery* theWrappedObject, int pos, const QVariant& val, QSql::ParamType type = QSql::In); | ||
bool isActive(QSqlQuery* theWrappedObject) const; | ||||
florianlink
|
r28 | bool isNull(QSqlQuery* theWrappedObject, int field) const; | ||
florianlink
|
r73 | int at(QSqlQuery* theWrappedObject) const; | ||
void bindValue(QSqlQuery* theWrappedObject, const QString& placeholder, const QVariant& val, QSql::ParamType type = QSql::In); | ||||
bool previous(QSqlQuery* theWrappedObject); | ||||
const QSqlDriver* driver(QSqlQuery* theWrappedObject) const; | ||||
bool execBatch(QSqlQuery* theWrappedObject, QSqlQuery::BatchExecutionMode mode = QSqlQuery::ValuesAsRows); | ||||
void finish(QSqlQuery* theWrappedObject); | ||||
bool isValid(QSqlQuery* theWrappedObject) const; | ||||
florianlink
|
r24 | const QSqlResult* result(QSqlQuery* theWrappedObject) const; | ||
florianlink
|
r73 | QVariant boundValue(QSqlQuery* theWrappedObject, int pos) const; | ||
florianlink
|
r13 | QSqlError lastError(QSqlQuery* theWrappedObject) const; | ||
florianlink
|
r73 | QSql::NumericalPrecisionPolicy numericalPrecisionPolicy(QSqlQuery* theWrappedObject) const; | ||
QMap<QString , QVariant > boundValues(QSqlQuery* theWrappedObject) const; | ||||
florianlink
|
r24 | bool next(QSqlQuery* theWrappedObject); | ||
florianlink
|
r73 | void setNumericalPrecisionPolicy(QSqlQuery* theWrappedObject, QSql::NumericalPrecisionPolicy precisionPolicy); | ||
florianlink
|
r28 | bool exec(QSqlQuery* theWrappedObject, const QString& query); | ||
QString lastQuery(QSqlQuery* theWrappedObject) const; | ||||
florianlink
|
r73 | int numRowsAffected(QSqlQuery* theWrappedObject) const; | ||
QVariant value(QSqlQuery* theWrappedObject, int i) const; | ||||
void clear(QSqlQuery* theWrappedObject); | ||||
florianlink
|
r28 | bool first(QSqlQuery* theWrappedObject); | ||
void setForwardOnly(QSqlQuery* theWrappedObject, bool forward); | ||||
florianlink
|
r73 | bool isForwardOnly(QSqlQuery* theWrappedObject) const; | ||
bool prepare(QSqlQuery* theWrappedObject, const QString& query); | ||||
florianlink
|
r28 | bool isSelect(QSqlQuery* theWrappedObject) const; | ||
florianlink
|
r73 | bool seek(QSqlQuery* theWrappedObject, int i, bool relative = false); | ||
QString executedQuery(QSqlQuery* theWrappedObject) const; | ||||
int size(QSqlQuery* theWrappedObject) const; | ||||
bool last(QSqlQuery* theWrappedObject); | ||||
florianlink
|
r13 | }; | ||
#endif // PYTHONQTWRAPPER_QSQLQUERY_H | ||||