File indexing completed on 2024-09-29 12:31:16

0001 /* This file is part of the KDE project
0002    Copyright (C) 2016 Jarosław Staniek <staniek@kde.org>
0003 
0004    This program is free software; you can redistribute it and/or
0005    modify it under the terms of the GNU Library General Public
0006    License as published by the Free Software Foundation; either
0007    version 2 of the License, or (at your option) any later version.
0008 
0009    This program is distributed in the hope that it will be useful,
0010    but WITHOUT ANY WARRANTY; without even the implied warranty of
0011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012    Library General Public License for more details.
0013 
0014    You should have received a copy of the GNU Library General Public License
0015    along with this program; see the file COPYING.  If not, write to
0016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0017  * Boston, MA 02110-1301, USA.
0018 */
0019 
0020 #include "KDbConnectionProxy.h"
0021 #include "KDbConnectionData.h"
0022 #include "KDbProperties.h"
0023 #include "KDbVersionInfo.h"
0024 
0025 class Q_DECL_HIDDEN KDbConnectionProxy::Private
0026 {
0027 public:
0028     Private()
0029      : connectionIsOwned(true)
0030     {
0031     }
0032     ~Private() {
0033         if (connectionIsOwned) {
0034             connection->disconnect();
0035             delete connection;
0036         }
0037     }
0038     bool connectionIsOwned;
0039     KDbConnection *connection;
0040 private:
0041     Q_DISABLE_COPY(Private)
0042 };
0043 
0044 KDbConnectionProxy::KDbConnectionProxy(KDbConnection *parentConnection)
0045  : KDbConnection(parentConnection->driver(), parentConnection->data(), *parentConnection->options())
0046  , d(new Private)
0047 {
0048     Q_ASSERT(parentConnection);
0049     d->connection = parentConnection;
0050 }
0051 
0052 KDbConnectionProxy::~KDbConnectionProxy()
0053 {
0054     delete d;
0055 }
0056 
0057 KDbConnection* KDbConnectionProxy::parentConnection()
0058 {
0059     return d->connection;
0060 }
0061 
0062 const KDbConnection* KDbConnectionProxy::parentConnection() const
0063 {
0064     return d->connection;
0065 }
0066 
0067 void KDbConnectionProxy::setParentConnectionIsOwned(bool set)
0068 {
0069     d->connectionIsOwned = set;
0070 }
0071 
0072 KDbConnectionData KDbConnectionProxy::data() const
0073 {
0074     return d->connection->data();
0075 }
0076 
0077 KDbDriver* KDbConnectionProxy::driver() const
0078 {
0079     return d->connection->driver();
0080 }
0081 
0082 bool KDbConnectionProxy::connect()
0083 {
0084     return d->connection->connect();
0085 }
0086 
0087 bool KDbConnectionProxy::isConnected() const
0088 {
0089     return d->connection->isConnected();
0090 }
0091 
0092 bool KDbConnectionProxy::isDatabaseUsed() const
0093 {
0094     return d->connection->isDatabaseUsed();
0095 }
0096 
0097 KDbConnectionOptions* KDbConnectionProxy::options()
0098 {
0099     return d->connection->options();
0100 }
0101 
0102 void KDbConnectionProxy::clearResult()
0103 {
0104     d->connection->clearResult();
0105 }
0106 
0107 KDbResult KDbConnectionProxy::result() const
0108 {
0109     return d->connection->result();
0110 }
0111 
0112 KDbResultable KDbConnectionProxy::resultable() const
0113 {
0114     return *d->connection;
0115 }
0116 
0117 bool KDbConnectionProxy::disconnect()
0118 {
0119     return d->connection->disconnect();
0120 }
0121 
0122 QStringList KDbConnectionProxy::databaseNames(bool also_system_db)
0123 {
0124     return d->connection->databaseNames(also_system_db);
0125 }
0126 
0127 bool KDbConnectionProxy::databaseExists(const QString &dbName, bool ignoreErrors)
0128 {
0129     return d->connection->databaseExists(dbName, ignoreErrors);
0130 }
0131 
0132 bool KDbConnectionProxy::createDatabase(const QString &dbName)
0133 {
0134     return d->connection->createDatabase(dbName);
0135 }
0136 
0137 bool KDbConnectionProxy::useDatabase(const QString &dbName, bool kexiCompatible, bool *cancelled,
0138                                      KDbMessageHandler* msgHandler)
0139 {
0140     return d->connection->useDatabase(dbName, kexiCompatible, cancelled, msgHandler);
0141 }
0142 
0143 bool KDbConnectionProxy::closeDatabase()
0144 {
0145     return d->connection->closeDatabase();
0146 }
0147 
0148 QString KDbConnectionProxy::currentDatabase() const
0149 {
0150     return d->connection->currentDatabase();
0151 }
0152 
0153 bool KDbConnectionProxy::dropDatabase(const QString &dbName)
0154 {
0155     return d->connection->dropDatabase(dbName);
0156 }
0157 
0158 QStringList KDbConnectionProxy::objectNames(int objectType, bool* ok)
0159 {
0160     return d->connection->objectNames(objectType, ok);
0161 }
0162 
0163 QStringList KDbConnectionProxy::tableNames(bool alsoSystemTables, bool* ok)
0164 {
0165     return d->connection->tableNames(alsoSystemTables, ok);
0166 }
0167 
0168 tristate KDbConnectionProxy::containsTable(const QString &tableName)
0169 {
0170     return d->connection->containsTable(tableName);
0171 }
0172 
0173 KDbServerVersionInfo KDbConnectionProxy::serverVersion() const
0174 {
0175     return d->connection->serverVersion();
0176 }
0177 
0178 KDbVersionInfo KDbConnectionProxy::databaseVersion() const
0179 {
0180     return d->connection->databaseVersion();
0181 }
0182 
0183 KDbProperties KDbConnectionProxy::databaseProperties() const
0184 {
0185     return d->connection->databaseProperties();
0186 }
0187 
0188 QList<int> KDbConnectionProxy::tableIds(bool* ok)
0189 {
0190     return d->connection->tableIds(ok);
0191 }
0192 
0193 QList<int> KDbConnectionProxy::queryIds(bool* ok)
0194 {
0195     return d->connection->queryIds(ok);
0196 }
0197 
0198 QList<int> KDbConnectionProxy::objectIds(int objectType, bool* ok)
0199 {
0200     return d->connection->objectIds(objectType, ok);
0201 }
0202 
0203 KDbTransaction KDbConnectionProxy::beginTransaction()
0204 {
0205     return d->connection->beginTransaction();
0206 }
0207 
0208 bool KDbConnectionProxy::commitTransaction(KDbTransaction trans,
0209                                            KDbTransaction::CommitOptions options)
0210 {
0211     return d->connection->commitTransaction(trans, options);
0212 }
0213 
0214 bool KDbConnectionProxy::rollbackTransaction(KDbTransaction trans,
0215                                              KDbTransaction::CommitOptions options)
0216 {
0217     return d->connection->rollbackTransaction(trans, options);
0218 }
0219 
0220 KDbTransaction KDbConnectionProxy::defaultTransaction() const
0221 {
0222     return d->connection->defaultTransaction();
0223 }
0224 
0225 void KDbConnectionProxy::setDefaultTransaction(const KDbTransaction& trans)
0226 {
0227     d->connection->setDefaultTransaction(trans);
0228 }
0229 
0230 QList<KDbTransaction> KDbConnectionProxy::transactions()
0231 {
0232     return d->connection->transactions();
0233 }
0234 
0235 bool KDbConnectionProxy::autoCommit() const
0236 {
0237     return d->connection->autoCommit();
0238 }
0239 
0240 bool KDbConnectionProxy::setAutoCommit(bool on)
0241 {
0242     return d->connection->setAutoCommit(on);
0243 }
0244 
0245 KDbEscapedString KDbConnectionProxy::escapeString(const QString& str) const
0246 {
0247     return d->connection->escapeString(str);
0248 }
0249 
0250 KDbCursor* KDbConnectionProxy::prepareQuery(const KDbEscapedString& sql, KDbCursor::Options options)
0251 {
0252     return d->connection->prepareQuery(sql, options);
0253 }
0254 
0255 KDbCursor* KDbConnectionProxy::prepareQuery(KDbQuerySchema* query, KDbCursor::Options options)
0256 {
0257     return d->connection->prepareQuery(query, options);
0258 }
0259 
0260 KDbCursor* KDbConnectionProxy::prepareQuery(KDbTableSchema* table, KDbCursor::Options options)
0261 {
0262     return d->connection->prepareQuery(table, options);
0263 }
0264 
0265 KDbCursor* KDbConnectionProxy::executeQuery(const KDbEscapedString& sql, KDbCursor::Options options)
0266 {
0267     return d->connection->executeQuery(sql, options);
0268 }
0269 
0270 KDbCursor* KDbConnectionProxy::executeQuery(KDbQuerySchema* query, const QList<QVariant>& params,
0271                         KDbCursor::Options options)
0272 {
0273     return d->connection->executeQuery(query, params, options);
0274 }
0275 
0276 KDbCursor* KDbConnectionProxy::executeQuery(KDbQuerySchema* query, KDbCursor::Options options)
0277 {
0278     return d->connection->executeQuery(query, options);
0279 }
0280 
0281 KDbCursor* KDbConnectionProxy::executeQuery(KDbTableSchema* table, KDbCursor::Options options)
0282 {
0283     return d->connection->executeQuery(table, options);
0284 }
0285 
0286 bool KDbConnectionProxy::deleteCursor(KDbCursor *cursor)
0287 {
0288     return d->connection->deleteCursor(cursor);
0289 }
0290 
0291 KDbTableSchema* KDbConnectionProxy::tableSchema(int tableId)
0292 {
0293     return d->connection->tableSchema(tableId);
0294 }
0295 
0296 KDbTableSchema* KDbConnectionProxy::tableSchema(const QString& tableName)
0297 {
0298     return d->connection->tableSchema(tableName);
0299 }
0300 
0301 KDbQuerySchema* KDbConnectionProxy::querySchema(int queryId)
0302 {
0303     return d->connection->querySchema(queryId);
0304 }
0305 
0306 KDbQuerySchema* KDbConnectionProxy::querySchema(const QString& queryName)
0307 {
0308     return d->connection->querySchema(queryName);
0309 }
0310 
0311 bool KDbConnectionProxy::setQuerySchemaObsolete(const QString& queryName)
0312 {
0313     return d->connection->setQuerySchemaObsolete(queryName);
0314 }
0315 
0316 tristate KDbConnectionProxy::querySingleRecord(const KDbEscapedString &sql, KDbRecordData *data,
0317                                                QueryRecordOptions options)
0318 {
0319     return d->connection->querySingleRecord(sql, data, options);
0320 }
0321 
0322 tristate KDbConnectionProxy::querySingleRecord(KDbQuerySchema* query, KDbRecordData* data,
0323                                                QueryRecordOptions options)
0324 {
0325     return d->connection->querySingleRecord(query, data, options);
0326 }
0327 
0328 tristate KDbConnectionProxy::querySingleRecord(KDbQuerySchema* query, KDbRecordData* data,
0329                            const QList<QVariant>& params, QueryRecordOptions options)
0330 {
0331     return d->connection->querySingleRecord(query, data, params, options);
0332 }
0333 
0334 tristate KDbConnectionProxy::querySingleString(const KDbEscapedString& sql, QString* value, int column,
0335                                                QueryRecordOptions options)
0336 {
0337     return d->connection->querySingleString(sql, value, column, options);
0338 }
0339 
0340 tristate KDbConnectionProxy::querySingleString(KDbQuerySchema* query, QString* value, int column,
0341                                                QueryRecordOptions options)
0342 {
0343     return d->connection->querySingleString(query, value, column, options);
0344 }
0345 
0346 tristate KDbConnectionProxy::querySingleString(KDbQuerySchema* query, QString* value,
0347                                                const QList<QVariant>& params, int column,
0348                                                QueryRecordOptions options)
0349 {
0350     return d->connection->querySingleString(query, value, params, column, options);
0351 }
0352 
0353 tristate KDbConnectionProxy::querySingleNumber(const KDbEscapedString& sql, int* number, int column,
0354                                                QueryRecordOptions options)
0355 {
0356     return d->connection->querySingleNumber(sql, number, column, options);
0357 }
0358 
0359  tristate KDbConnectionProxy::querySingleNumber(KDbQuerySchema* query, int* number, int column,
0360                                                 QueryRecordOptions options)
0361  {
0362      return d->connection->querySingleNumber(query, number, column, options);
0363  }
0364 
0365 tristate KDbConnectionProxy::querySingleNumber(KDbQuerySchema* query, int* number,
0366                                                const QList<QVariant>& params, int column,
0367                                                QueryRecordOptions options)
0368 {
0369     return d->connection->querySingleNumber(query, number, params, column, options);
0370 }
0371 
0372 bool KDbConnectionProxy::queryStringList(const KDbEscapedString& sql, QStringList* list, int column)
0373 {
0374     return d->connection->queryStringList(sql, list, column);
0375 }
0376 
0377 bool KDbConnectionProxy::queryStringList(KDbQuerySchema* query, QStringList* list, int column)
0378 {
0379     return d->connection->queryStringList(query, list, column);
0380 }
0381 
0382 bool KDbConnectionProxy::queryStringList(KDbQuerySchema* query, QStringList* list,
0383                      const QList<QVariant>& params, int column)
0384 {
0385     return d->connection->queryStringList(query, list, params, column);
0386 }
0387 
0388 tristate KDbConnectionProxy::resultExists(const KDbEscapedString& sql, QueryRecordOptions options)
0389 {
0390     return d->connection->resultExists(sql, options);
0391 }
0392 
0393 tristate KDbConnectionProxy::isEmpty(KDbTableSchema* table)
0394 {
0395     return d->connection->isEmpty(table);
0396 }
0397 
0398 KDbEscapedString KDbConnectionProxy::recentSqlString() const
0399 {
0400     return d->connection->recentSqlString();
0401 }
0402 
0403 //PROTOTYPE:
0404 #define A , const QVariant&
0405 #define H_INS_REC(args, ...) bool KDbConnectionProxy::insertRecord(KDbTableSchema* tableSchema args) \
0406 { \
0407     return d->connection->insertRecord(tableSchema, __VA_ARGS__); \
0408 }
0409 #define H_INS_REC_ALL \
0410 H_INS_REC(A a1, a1) \
0411 H_INS_REC(A a1 A a2, a1, a2) \
0412 H_INS_REC(A a1 A a2 A a3, a1, a2, a3) \
0413 H_INS_REC(A a1 A a2 A a3 A a4, a1, a2, a3, a4) \
0414 H_INS_REC(A a1 A a2 A a3 A a4 A a5, a1, a2, a3, a4, a5) \
0415 H_INS_REC(A a1 A a2 A a3 A a4 A a5 A a6, a1, a2, a3, a4, a5, a6) \
0416 H_INS_REC(A a1 A a2 A a3 A a4 A a5 A a6 A a7, a1, a2, a3, a4, a5, a6, a7) \
0417 H_INS_REC(A a1 A a2 A a3 A a4 A a5 A a6 A a7 A a8, a1, a2, a3, a4, a5, a6, a7, a8)
0418 H_INS_REC_ALL
0419 
0420 #undef H_INS_REC
0421 #define H_INS_REC(args, ...) bool KDbConnectionProxy::insertRecord(KDbFieldList* fields args) \
0422 { \
0423     return d->connection->insertRecord(fields, __VA_ARGS__); \
0424 }
0425 
0426 H_INS_REC_ALL
0427 #undef H_INS_REC_ALL
0428 #undef H_INS_REC
0429 #undef A
0430 
0431 bool KDbConnectionProxy::insertRecord(KDbTableSchema* tableSchema, const QList<QVariant>& values)
0432 {
0433     return d->connection->insertRecord(tableSchema, values);
0434 }
0435 
0436 bool KDbConnectionProxy::insertRecord(KDbFieldList* fields, const QList<QVariant>& values)
0437 {
0438     return d->connection->insertRecord(fields, values);
0439 }
0440 
0441 bool KDbConnectionProxy::createTable(KDbTableSchema* tableSchema, CreateTableOptions options)
0442 {
0443     return d->connection->createTable(tableSchema, options);
0444 }
0445 
0446 KDbTableSchema *KDbConnectionProxy::copyTable(const KDbTableSchema &tableSchema, const KDbObject &newData)
0447 {
0448     return d->connection->copyTable(tableSchema, newData);
0449 }
0450 
0451 KDbTableSchema *KDbConnectionProxy::copyTable(const QString& tableName, const KDbObject &newData)
0452 {
0453     return d->connection->copyTable(tableName, newData);
0454 }
0455 
0456 tristate KDbConnectionProxy::dropTable(KDbTableSchema* tableSchema)
0457 {
0458     return d->connection->dropTable(tableSchema);
0459 }
0460 
0461 tristate KDbConnectionProxy::dropTable(const QString& tableName)
0462 {
0463     return d->connection->dropTable(tableName);
0464 }
0465 
0466 tristate KDbConnectionProxy::alterTable(KDbTableSchema* tableSchema, KDbTableSchema* newTableSchema)
0467 {
0468     return d->connection->alterTable(tableSchema, newTableSchema);
0469 }
0470 
0471 bool KDbConnectionProxy::alterTableName(KDbTableSchema* tableSchema, const QString& newName,
0472                                         AlterTableNameOptions options)
0473 {
0474     return d->connection->alterTableName(tableSchema, newName, options);
0475 }
0476 
0477 bool KDbConnectionProxy::dropQuery(KDbQuerySchema* querySchema)
0478 {
0479     return d->connection->dropQuery(querySchema);
0480 }
0481 
0482 bool KDbConnectionProxy::dropQuery(const QString& queryName)
0483 {
0484     return d->connection->dropQuery(queryName);
0485 }
0486 
0487 bool KDbConnectionProxy::removeObject(int objId)
0488 {
0489     return d->connection->removeObject(objId);
0490 }
0491 
0492 KDbField* KDbConnectionProxy::findSystemFieldName(const KDbFieldList& fieldlist)
0493 {
0494     return d->connection->findSystemFieldName(fieldlist);
0495 }
0496 
0497 QString KDbConnectionProxy::anyAvailableDatabaseName()
0498 {
0499     return d->connection->anyAvailableDatabaseName();
0500 }
0501 
0502 void KDbConnectionProxy::setAvailableDatabaseName(const QString& dbName)
0503 {
0504     d->connection->setAvailableDatabaseName(dbName);
0505 }
0506 
0507 bool KDbConnectionProxy::useTemporaryDatabaseIfNeeded(QString* name)
0508 {
0509     return d->connection->useTemporaryDatabaseIfNeeded(name);
0510 }
0511 
0512 QSharedPointer<KDbSqlResult> KDbConnectionProxy::prepareSql(const KDbEscapedString& sql)
0513 {
0514     return d->connection->prepareSql(sql);
0515 }
0516 
0517 bool KDbConnectionProxy::executeSql(const KDbEscapedString& sql)
0518 {
0519     return d->connection->executeSql(sql);
0520 }
0521 
0522 bool KDbConnectionProxy::storeObjectData(KDbObject* object)
0523 {
0524     return d->connection->storeObjectData(object);
0525 }
0526 
0527 bool KDbConnectionProxy::storeNewObjectData(KDbObject* object)
0528 {
0529     return d->connection->storeNewObjectData(object);
0530 }
0531 
0532 tristate KDbConnectionProxy::loadObjectData(int type, int id, KDbObject* object)
0533 {
0534     return d->connection->loadObjectData(type, id, object);
0535 }
0536 
0537 tristate KDbConnectionProxy::loadObjectData(int type, const QString& name, KDbObject* object)
0538 {
0539     return d->connection->loadObjectData(type, name, object);
0540 }
0541 
0542 tristate KDbConnectionProxy::loadDataBlock(int objectID, QString* dataString, const QString& dataID)
0543 {
0544     return d->connection->loadDataBlock(objectID, dataString, dataID);
0545 }
0546 
0547 bool KDbConnectionProxy::storeDataBlock(int objectID, const QString &dataString,
0548                     const QString& dataID)
0549 {
0550     return d->connection->storeDataBlock(objectID, dataString, dataID);
0551 }
0552 
0553 bool KDbConnectionProxy::copyDataBlock(int sourceObjectID, int destObjectID, const QString& dataID)
0554 {
0555     return d->connection->copyDataBlock(sourceObjectID, destObjectID, dataID);
0556 }
0557 
0558 bool KDbConnectionProxy::removeDataBlock(int objectID, const QString& dataID)
0559 {
0560     return d->connection->removeDataBlock(objectID, dataID);
0561 }
0562 
0563 KDbPreparedStatement KDbConnectionProxy::prepareStatement(KDbPreparedStatement::Type type,
0564     KDbFieldList* fields, const QStringList& whereFieldNames)
0565 {
0566     return d->connection->prepareStatement(type, fields, whereFieldNames);
0567 }
0568 
0569 bool KDbConnectionProxy::isInternalTableSchema(const QString& tableName)
0570 {
0571     return d->connection->isInternalTableSchema(tableName);
0572 }
0573 
0574 QString KDbConnectionProxy::escapeIdentifier(const QString& id) const
0575 {
0576     return d->connection->escapeIdentifier(id);
0577 }
0578 
0579 bool KDbConnectionProxy::drv_connect()
0580 {
0581     return d->connection->drv_connect();
0582 }
0583 
0584 bool KDbConnectionProxy::drv_disconnect()
0585 {
0586     return d->connection->drv_disconnect();
0587 }
0588 
0589 bool KDbConnectionProxy::drv_getServerVersion(KDbServerVersionInfo* version)
0590 {
0591     return d->connection->drv_getServerVersion(version);
0592 }
0593 
0594 QStringList KDbConnectionProxy::drv_getTableNames(bool *ok)
0595 {
0596     Q_ASSERT(ok);
0597     return d->connection->drv_getTableNames(ok);
0598 }
0599 
0600 tristate KDbConnectionProxy::drv_containsTable(const QString &tableName)
0601 {
0602     return d->connection->drv_containsTable(tableName);
0603 }
0604 
0605 bool KDbConnectionProxy::drv_createTable(const KDbTableSchema& tableSchema)
0606 {
0607     return d->connection->drv_createTable(tableSchema);
0608 }
0609 
0610 bool KDbConnectionProxy::drv_alterTableName(KDbTableSchema* tableSchema, const QString& newName)
0611 {
0612     return d->connection->drv_alterTableName(tableSchema, newName);
0613 }
0614 
0615 bool KDbConnectionProxy::drv_copyTableData(const KDbTableSchema &tableSchema,
0616                                            const KDbTableSchema &destinationTableSchema)
0617 {
0618     return d->connection->drv_copyTableData(tableSchema, destinationTableSchema);
0619 }
0620 
0621 bool KDbConnectionProxy::drv_dropTable(const QString& tableName)
0622 {
0623     return d->connection->drv_dropTable(tableName);
0624 }
0625 
0626 tristate KDbConnectionProxy::dropTableInternal(KDbTableSchema* tableSchema, bool alsoRemoveSchema)
0627 {
0628     return d->connection->dropTableInternal(tableSchema, alsoRemoveSchema);
0629 }
0630 
0631 bool KDbConnectionProxy::setupObjectData(const KDbRecordData& data, KDbObject* object)
0632 {
0633     return d->connection->setupObjectData(data, object);
0634 }
0635 
0636 KDbField* KDbConnectionProxy::setupField(const KDbRecordData& data)
0637 {
0638     return d->connection->setupField(data);
0639 }
0640 
0641 KDbSqlResult* KDbConnectionProxy::drv_prepareSql(const KDbEscapedString& sql)
0642 {
0643     return d->connection->drv_prepareSql(sql);
0644 }
0645 
0646 bool KDbConnectionProxy::drv_executeSql(const KDbEscapedString& sql)
0647 {
0648     return d->connection->drv_executeSql(sql);
0649 }
0650 
0651 bool KDbConnectionProxy::drv_getDatabasesList(QStringList* list)
0652 {
0653     return d->connection->drv_getDatabasesList(list);
0654 }
0655 
0656 bool KDbConnectionProxy::drv_databaseExists(const QString &dbName, bool ignoreErrors)
0657 {
0658     return d->connection->drv_databaseExists(dbName, ignoreErrors);
0659 }
0660 
0661 bool KDbConnectionProxy::drv_createDatabase(const QString &dbName)
0662 {
0663     return d->connection->drv_createDatabase(dbName);
0664 }
0665 
0666 bool KDbConnectionProxy::drv_useDatabase(const QString &dbName, bool *cancelled,
0667                                          KDbMessageHandler* msgHandler)
0668 {
0669     return d->connection->drv_useDatabase(dbName, cancelled, msgHandler);
0670 }
0671 
0672 bool KDbConnectionProxy::drv_closeDatabase()
0673 {
0674     return d->connection->drv_closeDatabase();
0675 }
0676 
0677 bool KDbConnectionProxy::drv_isDatabaseUsed() const
0678 {
0679     return d->connection->drv_isDatabaseUsed();
0680 }
0681 
0682 bool KDbConnectionProxy::drv_dropDatabase(const QString &dbName)
0683 {
0684     return d->connection->drv_dropDatabase(dbName);
0685 }
0686 
0687 bool KDbConnectionProxy::drv_createTable(const QString& tableName)
0688 {
0689     return d->connection->drv_createTable(tableName);
0690 }
0691 
0692 KDbTransactionData* KDbConnectionProxy::drv_beginTransaction()
0693 {
0694     return d->connection->drv_beginTransaction();
0695 }
0696 
0697 bool KDbConnectionProxy::drv_commitTransaction(KDbTransactionData* trans)
0698 {
0699     return d->connection->drv_commitTransaction(trans);
0700 }
0701 
0702 bool KDbConnectionProxy::drv_rollbackTransaction(KDbTransactionData* trans)
0703 {
0704     return d->connection->drv_rollbackTransaction(trans);
0705 }
0706 
0707 bool KDbConnectionProxy::drv_beforeInsert(const QString& tableName, KDbFieldList* fields)
0708 {
0709     return d->connection->drv_beforeInsert(tableName, fields);
0710 }
0711 
0712 bool KDbConnectionProxy::drv_afterInsert(const QString& tableName, KDbFieldList* fields)
0713 {
0714     return d->connection->drv_afterInsert(tableName, fields);
0715 }
0716 
0717 bool KDbConnectionProxy::drv_beforeUpdate(const QString& tableName, KDbFieldList* fields)
0718 {
0719     return d->connection->drv_beforeUpdate(tableName, fields);
0720 }
0721 
0722 bool KDbConnectionProxy::drv_afterUpdate(const QString& tableName, KDbFieldList* fields)
0723 {
0724     return d->connection->drv_afterUpdate(tableName, fields);
0725 }
0726 
0727 bool KDbConnectionProxy::drv_setAutoCommit(bool on)
0728 {
0729     return d->connection->drv_setAutoCommit(on);
0730 }
0731 
0732 KDbPreparedStatementInterface* KDbConnectionProxy::prepareStatementInternal()
0733 {
0734     return d->connection->prepareStatementInternal();
0735 }
0736 
0737 bool KDbConnectionProxy::beginAutoCommitTransaction(KDbTransactionGuard* tg)
0738 {
0739     return d->connection->beginAutoCommitTransaction(tg);
0740 }
0741 
0742 bool KDbConnectionProxy::commitAutoCommitTransaction(const KDbTransaction& trans)
0743 {
0744     return d->connection->commitAutoCommitTransaction(trans);
0745 }
0746 
0747 bool KDbConnectionProxy::rollbackAutoCommitTransaction(const KDbTransaction& trans)
0748 {
0749     return d->connection->rollbackAutoCommitTransaction(trans);
0750 }
0751 
0752 bool KDbConnectionProxy::checkConnected()
0753 {
0754     return d->connection->checkConnected();
0755 }
0756 
0757 bool KDbConnectionProxy::checkIsDatabaseUsed()
0758 {
0759     return d->connection->checkIsDatabaseUsed();
0760 }
0761 
0762 bool KDbConnectionProxy::updateRecord(KDbQuerySchema* query, KDbRecordData* data, KDbRecordEditBuffer* buf, bool useRecordId)
0763 {
0764     return d->connection->updateRecord(query, data, buf, useRecordId);
0765 }
0766 
0767 bool KDbConnectionProxy::insertRecord(KDbQuerySchema* query, KDbRecordData* data, KDbRecordEditBuffer* buf, bool getRecordId)
0768 {
0769     return d->connection->insertRecord(query, data, buf, getRecordId);
0770 }
0771 
0772 bool KDbConnectionProxy::deleteRecord(KDbQuerySchema* query, KDbRecordData* data, bool useRecordId)
0773 {
0774     return d->connection->deleteRecord(query, data, useRecordId);
0775 }
0776 
0777 bool KDbConnectionProxy::deleteAllRecords(KDbQuerySchema* query)
0778 {
0779     return d->connection->deleteAllRecords(query);
0780 }
0781 
0782 bool KDbConnectionProxy::checkIfColumnExists(KDbCursor *cursor, int column)
0783 {
0784     return d->connection->checkIfColumnExists(cursor, column);
0785 }
0786 
0787 tristate KDbConnectionProxy::querySingleRecordInternal(KDbRecordData* data, const KDbEscapedString* sql,
0788                                                        KDbQuerySchema* query, const QList<QVariant>* params,
0789                                                        QueryRecordOptions options)
0790 {
0791     return d->connection->querySingleRecordInternal(data, sql, query, params, options);
0792 }
0793 
0794 tristate KDbConnectionProxy::querySingleStringInternal(const KDbEscapedString* sql, QString* value,
0795                                    KDbQuerySchema* query, const QList<QVariant>* params,
0796                                    int column, QueryRecordOptions options)
0797 {
0798     return d->connection->querySingleStringInternal(sql, value, query, params, column, options);
0799 }
0800 
0801 tristate KDbConnectionProxy::querySingleNumberInternal(const KDbEscapedString* sql, int* number,
0802                                    KDbQuerySchema* query, const QList<QVariant>* params,
0803                                    int column, QueryRecordOptions options)
0804 {
0805     return d->connection->querySingleNumberInternal(sql, number, query, params, column, options);
0806 }
0807 
0808 bool KDbConnectionProxy::queryStringListInternal(const KDbEscapedString *sql, QStringList* list,
0809                              KDbQuerySchema* query, const QList<QVariant>* params,
0810                              int column, bool (*filterFunction)(const QString&))
0811 {
0812     return d->connection->queryStringListInternal(sql, list, query, params, column, filterFunction);
0813 }
0814 
0815 KDbCursor* KDbConnectionProxy::executeQueryInternal(const KDbEscapedString& sql, KDbQuerySchema* query,
0816                                 const QList<QVariant>* params)
0817 {
0818     return d->connection->executeQueryInternal(sql, query, params);
0819 }
0820 
0821 bool KDbConnectionProxy::loadExtendedTableSchemaData(KDbTableSchema* tableSchema)
0822 {
0823     return d->connection->loadExtendedTableSchemaData(tableSchema);
0824 }
0825 
0826 bool KDbConnectionProxy::storeExtendedTableSchemaData(KDbTableSchema* tableSchema)
0827 {
0828     return d->connection->storeExtendedTableSchemaData(tableSchema);
0829 }
0830 
0831 bool KDbConnectionProxy::storeMainFieldSchema(KDbField *field)
0832 {
0833     return d->connection->storeMainFieldSchema(field);
0834 }