PythonQtWrapper_QSqlDatabase.cpp
230 lines
| 6.4 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QSqlDatabase.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
r13 | #include <QSize> | ||
#include <QSqlError> | ||||
#include <QSqlIndex> | ||||
#include <QSqlQuery> | ||||
#include <QSqlRecord> | ||||
#include <QStringList> | ||||
#include <QVariant> | ||||
#include <qsqldatabase.h> | ||||
#include <qsqldriver.h> | ||||
#include <qsqlerror.h> | ||||
#include <qsqlindex.h> | ||||
#include <qsqlquery.h> | ||||
#include <qsqlrecord.h> | ||||
#include <qstringlist.h> | ||||
QSqlDatabase* PythonQtWrapper_QSqlDatabase::new_QSqlDatabase() | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QSqlDatabase(); } | ||
florianlink
|
r13 | |||
QSqlDatabase* PythonQtWrapper_QSqlDatabase::new_QSqlDatabase(const QSqlDatabase& other) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QSqlDatabase(other); } | ||
florianlink
|
r13 | |||
florianlink
|
r73 | bool PythonQtWrapper_QSqlDatabase::static_QSqlDatabase_contains(const QString& connectionName) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return (QSqlDatabase::contains(connectionName)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QSqlDatabase::isOpenError(QSqlDatabase* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->isOpenError()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QSqlDatabase::isValid(QSqlDatabase* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->isValid()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QSqlError PythonQtWrapper_QSqlDatabase::lastError(QSqlDatabase* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->lastError()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QSqlDatabase::setConnectOptions(QSqlDatabase* theWrappedObject, const QString& options) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setConnectOptions(options)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QSqlDatabase::setUserName(QSqlDatabase* theWrappedObject, const QString& name) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setUserName(name)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QSqlDatabase::setHostName(QSqlDatabase* theWrappedObject, const QString& host) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setHostName(host)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QStringList PythonQtWrapper_QSqlDatabase::tables(QSqlDatabase* theWrappedObject, QSql::TableType type) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->tables(type)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QSqlDatabase::setPort(QSqlDatabase* theWrappedObject, int p) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setPort(p)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QSqlDatabase::connectionName(QSqlDatabase* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->connectionName()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QSqlDatabase::static_QSqlDatabase_removeDatabase(const QString& connectionName) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | (QSqlDatabase::removeDatabase(connectionName)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QSqlDatabase PythonQtWrapper_QSqlDatabase::static_QSqlDatabase_cloneDatabase(const QSqlDatabase& other, const QString& connectionName) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return (QSqlDatabase::cloneDatabase(other, connectionName)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QSqlDatabase::connectOptions(QSqlDatabase* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->connectOptions()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QStringList PythonQtWrapper_QSqlDatabase::static_QSqlDatabase_connectionNames() | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return (QSqlDatabase::connectionNames()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QSqlDatabase PythonQtWrapper_QSqlDatabase::static_QSqlDatabase_addDatabase(QSqlDriver* driver, const QString& connectionName) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return (QSqlDatabase::addDatabase(driver, connectionName)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QSqlDatabase::rollback(QSqlDatabase* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->rollback()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QSqlDatabase::isOpen(QSqlDatabase* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->isOpen()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | int PythonQtWrapper_QSqlDatabase::port(QSqlDatabase* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->port()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QSqlDatabase::driverName(QSqlDatabase* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->driverName()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QSqlQuery PythonQtWrapper_QSqlDatabase::exec(QSqlDatabase* theWrappedObject, const QString& query) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->exec(query)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QSqlDatabase::setDatabaseName(QSqlDatabase* theWrappedObject, const QString& name) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setDatabaseName(name)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QSqlDatabase::close(QSqlDatabase* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->close()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QSqlRecord PythonQtWrapper_QSqlDatabase::record(QSqlDatabase* theWrappedObject, const QString& tablename) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->record(tablename)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QSqlDatabase::userName(QSqlDatabase* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->userName()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QSqlDatabase::password(QSqlDatabase* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->password()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QSqlDatabase::databaseName(QSqlDatabase* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->databaseName()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QSqlDatabase PythonQtWrapper_QSqlDatabase::static_QSqlDatabase_database(const QString& connectionName, bool open) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return (QSqlDatabase::database(connectionName, open)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QStringList PythonQtWrapper_QSqlDatabase::static_QSqlDatabase_drivers() | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return (QSqlDatabase::drivers()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QSqlDatabase::static_QSqlDatabase_registerSqlDriver(const QString& name, QSqlDriverCreatorBase* creator) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | (QSqlDatabase::registerSqlDriver(name, creator)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | void PythonQtWrapper_QSqlDatabase::setPassword(QSqlDatabase* theWrappedObject, const QString& password) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | ( theWrappedObject->setPassword(password)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QSqlDatabase::commit(QSqlDatabase* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->commit()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QSqlDatabase PythonQtWrapper_QSqlDatabase::static_QSqlDatabase_addDatabase(const QString& type, const QString& connectionName) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return (QSqlDatabase::addDatabase(type, connectionName)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QSqlDriver* PythonQtWrapper_QSqlDatabase::driver(QSqlDatabase* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->driver()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QSqlDatabase::transaction(QSqlDatabase* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->transaction()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QSqlDatabase::open(QSqlDatabase* theWrappedObject, const QString& user, const QString& password) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->open(user, password)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QSqlIndex PythonQtWrapper_QSqlDatabase::primaryIndex(QSqlDatabase* theWrappedObject, const QString& tablename) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->primaryIndex(tablename)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | QString PythonQtWrapper_QSqlDatabase::hostName(QSqlDatabase* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->hostName()); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QSqlDatabase::static_QSqlDatabase_isDriverAvailable(const QString& name) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return (QSqlDatabase::isDriverAvailable(name)); | ||
florianlink
|
r13 | } | ||
florianlink
|
r73 | bool PythonQtWrapper_QSqlDatabase::open(QSqlDatabase* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r73 | return ( theWrappedObject->open()); | ||
} | ||||
QString PythonQtWrapper_QSqlDatabase::toString(QSqlDatabase* obj) { | ||||
QString result; | ||||
QDebug d(&result); | ||||
d << *obj; | ||||
return result; | ||||
florianlink
|
r13 | } | ||