summaryrefslogtreecommitdiffstats
path: root/kexi/kexidb/connection.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/kexidb/connection.h
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/kexidb/connection.h')
-rw-r--r--kexi/kexidb/connection.h209
1 files changed, 105 insertions, 104 deletions
diff --git a/kexi/kexidb/connection.h b/kexi/kexidb/connection.h
index b72e01d4..79bd3840 100644
--- a/kexi/kexidb/connection.h
+++ b/kexi/kexidb/connection.h
@@ -20,15 +20,15 @@
#ifndef KEXIDB_CONNECTION_H
#define KEXIDB_CONNECTION_H
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qintdict.h>
-#include <qdict.h>
-#include <qptrdict.h>
-#include <qvaluevector.h>
-#include <qvaluelist.h>
-#include <qvariant.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqintdict.h>
+#include <tqdict.h>
+#include <tqptrdict.h>
+#include <tqvaluevector.h>
+#include <tqvaluelist.h>
+#include <tqvariant.h>
+#include <tqguardedptr.h>
#include <kexidb/object.h>
#include <kexidb/connectiondata.h>
@@ -44,7 +44,7 @@
namespace KexiDB {
//! structure for storing single record with type information
-typedef QValueVector<QVariant> RowData;
+typedef TQValueVector<TQVariant> RowData;
class Cursor;
class ConnectionPrivate;
@@ -58,9 +58,10 @@ class AlterTableHandler;
It supports data queries and modification by creating client-side database cursors.
Database transactions are supported.
*/
-class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
+class KEXI_DB_EXPORT Connection : public TQObject, public KexiDB::Object
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -107,14 +108,14 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! \return list of database names for opened connection.
If \a also_system_db is true, the system database names are also returned. */
- QStringList databaseNames(bool also_system_db = false);
+ TQStringList databaseNames(bool also_system_db = false);
/*! \return true if database \a dbName exists.
If \a ignoreErrors is true, error flag of connection
won't be modified for any errors (it will quietly return),
else (ignoreErrors == false) we can check why the database does
not exist using error(), errorNum() and/or errorMsg(). */
- bool databaseExists( const QString &dbName, bool ignoreErrors = true );
+ bool databaseExists( const TQString &dbName, bool ignoreErrors = true );
/*! \brief Creates new database with name \a dbName, using this connection.
@@ -127,7 +128,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
for database schema documentation (detailed description of kexi__* 'system' tables).
\sa useDatabase() */
- bool createDatabase( const QString &dbName );
+ bool createDatabase( const TQString &dbName );
/*!
\brief Opens an existing database specified by \a dbName.
@@ -139,7 +140,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
(the same as specified for ConnectionData).
\return true on success, false on failure.
If user has cancelled this action and \a cancelled is not 0, *cancelled is set to true. */
- bool useDatabase( const QString &dbName, bool kexiCompatible = true, bool *cancelled = 0,
+ bool useDatabase( const TQString &dbName, bool kexiCompatible = true, bool *cancelled = 0,
MessageHandler* msgHandler = 0 );
/*!
@@ -153,27 +154,27 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
\return name of currently used database for this connection or empty string
if there is no used database */
- QString currentDatabase() const;
+ TQString currentDatabase() const;
/*! \brief Drops database with name \a dbName.
if dbName is not specified, currently used database name is used
(it is closed before dropping).
*/
- bool dropDatabase( const QString &dbName = QString::null );
+ bool dropDatabase( const TQString &dbName = TQString() );
/*! \return names of all the \a objecttype (see \a ObjectTypes in global.h)
schemas stored in currently used database. KexiDB::AnyObjectType can be passed
as \a objType to get names of objects of any type.
If \a ok is not null then variable pointed by it will be set to the result.
On error, the functions can return incomplete list. */
- QStringList objectNames(int objType = KexiDB::AnyObjectType, bool* ok = 0);
+ TQStringList objectNames(int objType = KexiDB::AnyObjectType, bool* ok = 0);
/*! \return names of all table schemas stored in currently
used database. If \a also_system_tables is true,
internal KexiDB system table names (kexi__*) are also returned.
\sa kexiDBSystemTableNames() */
- QStringList tableNames(bool also_system_tables = false);
+ TQStringList tableNames(bool also_system_tables = false);
/*! \return list of internal KexiDB system table names
(kexi__*). This does not mean that these tables can be found
@@ -184,7 +185,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
opened database can contain fewer 'system' tables than in current
KexiDB implementation, if the current one is newer than the one used
to build the database. */
- static const QStringList& kexiDBSystemTableNames();
+ static const TQStringList& kexiDBSystemTableNames();
/*! \return server version information for this connection.
If database is not connected (i.e. isConnected() is false) 0 is returned. */
@@ -206,16 +207,16 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
If \a also_system_tables is true,
Internal KexiDB system tables (kexi__*) are not available here
because these have no identifiers assigned (more formally: id=-1). */
- QValueList<int> tableIds();
+ TQValueList<int> tableIds();
/*! \return ids of all database query schemas stored in currently
used database. These ids can be later used as argument for querySchema().
This is a shortcut for objectIds(TableObjectType). */
- QValueList<int> queryIds();
+ TQValueList<int> queryIds();
/*! \return names of all schemas of object with \a objType type
that are stored in currently used database. */
- QValueList<int> objectIds(int objType);
+ TQValueList<int> objectIds(int objType);
/*! \brief Creates new transaction handle and starts a new transaction.
\return KexiDB::Transaction object if transaction has been started
@@ -231,7 +232,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Transaction beginTransaction();
/*! \todo for nested transactions:
- Tansaction* beginTransaction(transaction *parent_transaction);
+ Tansaction* beginTransaction(transaction *tqparent_transaction);
*/
/*! Commits transaction \a trans.
If there is not \a trans argument passed, and there is default transaction
@@ -283,7 +284,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Use Transaction::active() to check that. Inactive transaction
handle is useless and can be safely dropped.
*/
- const QValueList<Transaction>& transactions();
+ const TQValueList<Transaction>& transactions();
/*! \return true if "auto commit" option is on.
@@ -320,8 +321,8 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
bool setAutoCommit(bool on);
/*! driver-specific string escaping */
-//js: MOVED TO Driver virtual QString escapeString(const QString& str) const = 0;
-// virtual QCString escapeString(const QCString& str) const = 0;
+//js: MOVED TO Driver virtual TQString escapeString(const TQString& str) const = 0;
+// virtual TQCString escapeString(const TQCString& str) const = 0;
/*! Prepares SELECT query described by raw \a statement.
\return opened cursor created for results of this query
@@ -334,9 +335,9 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
resources and return Cursor subclass' object
(passing \a statement and \a cursor_options to it's constructor).
*/
- virtual Cursor* prepareQuery( const QString& statement, uint cursor_options = 0) = 0;
+ virtual Cursor* prepareQuery( const TQString& statement, uint cursor_options = 0) = 0;
- /*! \overload prepareQuery( const QString& statement = QString::null, uint cursor_options = 0)
+ /*! \overload prepareQuery( const TQString& statement = TQString(), uint cursor_options = 0)
Prepares query described by \a query schema. \a params are values of parameters that
will be inserted into places marked with [] before execution of the query.
@@ -345,16 +346,16 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
(passing \a query and \a cursor_options to it's constructor).
Kexi SQL and driver-specific escaping is performed on table names.
*/
- Cursor* prepareQuery( QuerySchema& query, const QValueList<QVariant>& params,
+ Cursor* prepareQuery( QuerySchema& query, const TQValueList<TQVariant>& params,
uint cursor_options = 0 );
- /*! \overload prepareQuery( QuerySchema& query, const QValueList<QVariant>& params,
+ /*! \overload prepareQuery( QuerySchema& query, const TQValueList<TQVariant>& params,
uint cursor_options = 0 )
Prepares query described by \a query schema without parameters.
*/
virtual Cursor* prepareQuery( QuerySchema& query, uint cursor_options = 0 ) = 0;
- /*! \overload prepareQuery( const QString& statement = QString::null, uint cursor_options = 0)
+ /*! \overload prepareQuery( const TQString& statement = TQString(), uint cursor_options = 0)
Statement is build from data provided by \a table schema,
it is like "select * from table_name".*/
Cursor* prepareQuery( TableSchema& table, uint cursor_options = 0);
@@ -367,22 +368,22 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Identifiers in \a statement that are the same as keywords in Kexi
SQL or the backend's SQL need to have been escaped.
*/
- Cursor* executeQuery( const QString& statement, uint cursor_options = 0 );
+ Cursor* executeQuery( const TQString& statement, uint cursor_options = 0 );
- /*! \overload executeQuery( const QString& statement, uint cursor_options = 0 )
+ /*! \overload executeQuery( const TQString& statement, uint cursor_options = 0 )
\a params are values of parameters that
will be inserted into places marked with [] before execution of the query.
Statement is build from data provided by \a query schema.
Kexi SQL and driver-specific escaping is performed on table names. */
- Cursor* executeQuery( QuerySchema& query, const QValueList<QVariant>& params,
+ Cursor* executeQuery( QuerySchema& query, const TQValueList<TQVariant>& params,
uint cursor_options = 0 );
- /*! \overload executeQuery( QuerySchema& query, const QValueList<QVariant>& params,
+ /*! \overload executeQuery( QuerySchema& query, const TQValueList<TQVariant>& params,
uint cursor_options = 0 ) */
Cursor* executeQuery( QuerySchema& query, uint cursor_options = 0 );
- /*! \overload executeQuery( const QString& statement, uint cursor_options = 0 )
+ /*! \overload executeQuery( const TQString& statement, uint cursor_options = 0 )
Executes query described by \a query schema without parameters.
Statement is build from data provided by \a table schema,
it is like "select * from table_name".*/
@@ -403,7 +404,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! \return schema of a table pointed by \a tableName, retrieved from currently
used database. KexiDB system table schema can be also retrieved.
\sa tableSchema( int tableId ) */
- TableSchema* tableSchema( const QString& tableName );
+ TableSchema* tableSchema( const TQString& tableName );
/*! \return schema of a query pointed by \a queryId, retrieved from currently
used database. The schema is cached inside connection,
@@ -412,10 +413,10 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! \return schema of a query pointed by \a queryName, retrieved from currently
used database. \sa querySchema( int queryId ) */
- QuerySchema* querySchema( const QString& queryName );
+ QuerySchema* querySchema( const TQString& queryName );
/*! Sets \a queryName query obsolete by moving it out of the query sets, so it will not be
- accessible by querySchema( const QString& queryName ). The existing query object is not
+ accessible by querySchema( const TQString& queryName ). The existing query object is not
destroyed, to avoid problems when it's referenced. In this case,
a new query schema will be retrieved directly from the backend.
@@ -423,10 +424,10 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
This solves the problem when user has changed a query schema but already form still uses
previously instantiated query schema.
\return true if there is such query. Otherwise the method does nothing. */
- bool setQuerySchemaObsolete( const QString& queryName );
+ bool setQuerySchemaObsolete( const TQString& queryName );
-//js: MOVED TO Driver QString valueToSQL( const Field::Type ftype, const QVariant& v ) const;
-// QString valueToSQL( const Field *field, const QVariant& v ) const;
+//js: MOVED TO Driver TQString valueToSQL( const Field::Type ftype, const TQVariant& v ) const;
+// TQString valueToSQL( const Field *field, const TQVariant& v ) const;
/*! Executes \a sql query and stores first record's data inside \a data.
This is convenient method when we need only first record from query result,
@@ -435,9 +436,9 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
so \a sql should not include one already.
\return true if query was successfully executed and first record has been found,
false on data retrieving failure, and cancelled if there's no single record available. */
- tristate querySingleRecord(const QString& sql, RowData &data, bool addLimitTo1 = true);
+ tristate querySingleRecord(const TQString& sql, RowData &data, bool addLimitTo1 = true);
- /*! Like tristate querySingleRecord(const QString& sql, RowData &data)
+ /*! Like tristate querySingleRecord(const TQString& sql, RowData &data)
but uses QuerySchema object.
If \a addLimitTo1 is true (the default), adds a LIMIT clause to the query. */
tristate querySingleRecord(QuerySchema& query, RowData &data, bool addLimitTo1 = true);
@@ -450,7 +451,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
\return true if query was successfully executed and first record has been found,
false on data retrieving failure, and cancelled if there's no single record available.
\sa queryStringList() */
- tristate querySingleString(const QString& sql, QString &value, uint column = 0,
+ tristate querySingleString(const TQString& sql, TQString &value, uint column = 0,
bool addLimitTo1 = true);
/*! Convenience function: executes \a sql query and stores first
@@ -458,7 +459,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Note: "LIMIT 1" is appended to \a sql statement if \a addLimitTo1 is true (the default).
\return true if query was successfully executed and first record has been found,
false on data retrieving failure, and cancelled if there's no single record available. */
- tristate querySingleNumber(const QString& sql, int &number, uint column = 0,
+ tristate querySingleNumber(const TQString& sql, int &number, uint column = 0,
bool addLimitTo1 = true);
/*! Executes \a sql query and stores Nth field's string value of every record
@@ -468,7 +469,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
\return true if all values were fetched successfuly,
false on data retrieving failure. Returning empty list can be still a valid result.
On errors, the list is not cleared, it may contain a few retrieved values. */
- bool queryStringList(const QString& sql, QStringList& list, uint column = 0);
+ bool queryStringList(const TQString& sql, TQStringList& list, uint column = 0);
/*! \return true if there is at least one record returned in \a sql query.
Does not fetch any records. \a success will be set to false
@@ -476,20 +477,20 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
"no results" and "query execution error" states.
Note: real executed query is: "SELECT 1 FROM (\a sql) LIMIT 1"
if \a addLimitTo1 is true (the default). */
- bool resultExists(const QString& sql, bool &success, bool addLimitTo1 = true);
+ bool resultExists(const TQString& sql, bool &success, bool addLimitTo1 = true);
/*! \return true if there is at least one record in \a table. */
bool isEmpty( TableSchema& table, bool &success );
-//! @todo perhaps use Q_ULLONG here?
+//! @todo perhaps use TQ_ULLONG here?
/*! \return number of records in \a sql query.
Does not fetch any records. -1 is returned on query execution errors (>0 otherwise).
Note: real executed query is: "SELECT COUNT() FROM (\a sql) LIMIT 1"
(using querySingleNumber()) */
- int resultCount(const QString& sql);
+ int resultCount(const TQString& sql);
//PROTOTYPE:
- #define A , const QVariant&
+ #define A , const TQVariant&
#define H_INS_REC(args) bool insertRecord(TableSchema &tableSchema args)
#define H_INS_REC_ALL \
H_INS_REC(A); \
@@ -510,9 +511,9 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
#undef H_INS_REC
#undef A
- bool insertRecord(TableSchema &tableSchema, QValueList<QVariant>& values);
+ bool insertRecord(TableSchema &tableSchema, TQValueList<TQVariant>& values);
- bool insertRecord(FieldList& fields, QValueList<QVariant>& values);
+ bool insertRecord(FieldList& fields, TQValueList<TQVariant>& values);
/*! Creates table defined by \a tableSchema.
Schema information is also added into kexi system tables, for later reuse.
@@ -531,7 +532,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
- \a tableSchema is not inserted into Connection's structures,
so you are still owner of this object
- existing table schema object is not destroyed (i.e. it is still available
- e.g. using Connection::tableSchema(const QString& ), even if the table
+ e.g. using Connection::tableSchema(const TQString& ), even if the table
was physically dropped.
*/
bool createTable( TableSchema* tableSchema, bool replaceExisting = false );
@@ -547,7 +548,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! It is a convenience function, does exactly the same as
bool dropTable( KexiDB::TableSchema* tableSchema ) */
- tristate dropTable( const QString& table );
+ tristate dropTable( const TQString& table );
/*! Alters \a tableSchema using \a newTableSchema in memory and on the db backend.
\return true on success, cancelled if altering was cancelled. */
@@ -565,7 +566,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
-- false is returned and ERR_OBJECT_EXISTS error is set.
The schema of \a tableSchema is updated on success.
\return true on success. */
- bool alterTableName(TableSchema& tableSchema, const QString& newName, bool replace = false);
+ bool alterTableName(TableSchema& tableSchema, const TQString& newName, bool tqreplace = false);
/*! Drops a query defined by \a querySchema.
If true is returned, schema information \a querySchema is destoyed
@@ -575,7 +576,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! It is a convenience function, does exactly the same as
bool dropQuery( KexiDB::QuerySchema* querySchema ) */
- bool dropQuery( const QString& query );
+ bool dropQuery( const TQString& query );
/*! Removes information about object with \a objId
from internal "kexi__object" and "kexi__objectdata" tables.
@@ -610,7 +611,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
this connection specifics
(e.g. you need to check something remotely).
*/
- virtual QString anyAvailableDatabaseName();
+ virtual TQString anyAvailableDatabaseName();
/*! Sets \a dbName as name of a database that can be accessible.
This is option that e.g. application that make use of KexiDB library can set
@@ -622,7 +623,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
\sa anyAvailableDatabaseName()
*/
- void setAvailableDatabaseName(const QString& dbName);
+ void setAvailableDatabaseName(const TQString& dbName);
/*! Because some engines need to have opened any database before
executing administrative sql statements like "create database" or "drop database",
@@ -639,7 +640,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Note: This method has nothing to do with creating or using temporary databases
in such meaning that these database are not persistent
*/
- bool useTemporaryDatabaseIfNeeded(QString &tmpdbName);
+ bool useTemporaryDatabaseIfNeeded(TQString &tmpdbName);
/*! \return autoincrement field's \a aiFieldName value
of last inserted record. This refers \a tableName table.
@@ -647,24 +648,24 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Simply, method internally fetches last inserted record and returns selected
field's value. Requirements: field must be of integer type, there must be a
record inserted in current database session (whatever this means).
- On error (Q_ULLONG)-1 is returned.
+ On error (TQ_ULLONG)-1 is returned.
Last inserted record is identified by magical row identifier, usually called
ROWID (PostgreSQL has it as well as SQLite;
see DriverBehaviour::ROW_ID_FIELD_RETURNS_LAST_AUTOINCREMENTED_VALUE).
ROWID's value will be assigned back to \a ROWID if this pointer is not null.
*/
- Q_ULLONG lastInsertedAutoIncValue(const QString& aiFieldName, const QString& tableName,
- Q_ULLONG* ROWID = 0);
+ TQ_ULLONG lastInsertedAutoIncValue(const TQString& aiFieldName, const TQString& tableName,
+ TQ_ULLONG* ROWID = 0);
- /*! \overload int lastInsertedAutoIncValue(const QString&, const QString&, Q_ULLONG*)
+ /*! \overload int lastInsertedAutoIncValue(const TQString&, const TQString&, TQ_ULLONG*)
*/
- Q_ULLONG lastInsertedAutoIncValue(const QString& aiFieldName,
- const TableSchema& table, Q_ULLONG* ROWID = 0);
+ TQ_ULLONG lastInsertedAutoIncValue(const TQString& aiFieldName,
+ const TableSchema& table, TQ_ULLONG* ROWID = 0);
/*! Executes query \a statement, but without returning resulting
rows (used mostly for functional queries).
Only use this method if you really need. */
- bool executeSQL( const QString& statement );
+ bool executeSQL( const TQString& statement );
//! @short options used in selectStatement()
class KEXI_DB_EXPORT SelectStatementOptions
@@ -687,19 +688,19 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! \return "SELECT ..." statement's string needed for executing query
defined by \a querySchema and \a params. */
- QString selectStatement( QuerySchema& querySchema,
- const QValueList<QVariant>& params,
+ TQString selectStatement( QuerySchema& querySchema,
+ const TQValueList<TQVariant>& params,
const SelectStatementOptions& options = SelectStatementOptions() ) const;
- /*! \overload QString selectStatement( QuerySchema& querySchema,
- QValueList<QVariant> params = QValueList<QVariant>(),
+ /*! \overload TQString selectStatement( QuerySchema& querySchema,
+ TQValueList<TQVariant> params = TQValueList<TQVariant>(),
const SelectStatementOptions& options = SelectStatementOptions() ) const;
\return "SELECT ..." statement's string needed for executing query
defined by \a querySchema. */
- inline QString selectStatement( QuerySchema& querySchema,
+ inline TQString selectStatement( QuerySchema& querySchema,
const SelectStatementOptions& options = SelectStatementOptions() ) const
{
- return selectStatement(querySchema, QValueList<QVariant>(), options);
+ return selectStatement(querySchema, TQValueList<TQVariant>(), options);
}
/*! Stores object's schema data (id, name, caption, help text)
@@ -721,13 +722,13 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! Finds object schema data for object of type \a objectType and name \a objectName.
If the object is found, resulted schema is stored in \a sdata and true is returned,
otherwise false is returned. */
- tristate loadObjectSchemaData( int objectType, const QString& objectName, SchemaData &sdata );
+ tristate loadObjectSchemaData( int objectType, const TQString& objectName, SchemaData &sdata );
/*! Loads (potentially large) data block (e.g. xml form's representation), referenced by objectID
and puts it to \a dataString. The can be block indexed with optional \a dataID.
\return true on success, false on failure and cancelled when there is no such data block
\sa storeDataBlock(). */
- tristate loadDataBlock( int objectID, QString &dataString, const QString& dataID );
+ tristate loadDataBlock( int objectID, TQString &dataString, const TQString& dataID );
/*! Stores (potentially large) data block \a dataString (e.g. xml form's representation),
referenced by objectID. Block will be stored in "kexi__objectdata" table and
@@ -735,14 +736,14 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
If there is already such record in the table, it's simply overwritten.
\return true on success
\sa loadDataBlock(). */
- bool storeDataBlock( int objectID, const QString &dataString, const QString& dataID = QString::null );
+ bool storeDataBlock( int objectID, const TQString &dataString, const TQString& dataID = TQString() );
/*! Removes (potentially large) string data (e.g. xml form's representation),
referenced by objectID, and pointed by optional \a dataID.
\return true on success. Does not fail if the block does not exist.
Note that if \a dataID is not specified, all data blocks for this dialog will be removed.
\sa loadDataBlock() storeDataBlock(). */
- bool removeDataBlock( int objectID, const QString& dataID = QString::null);
+ bool removeDataBlock( int objectID, const TQString& dataID = TQString());
class KEXI_DB_EXPORT TableSchemaChangeListenerInterface
{
@@ -755,7 +756,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! i18n'd string that can be displayed for user to inform about
e.g. conflicting listeners. */
- QString listenerInfoString;
+ TQString listenerInfoString;
};
//TMP// TODO: will be more generic
/** Register \a listener for receiving (listening) information about changes
@@ -768,7 +769,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
void unregisterForTablesSchemaChanges(TableSchemaChangeListenerInterface& listener);
- QPtrList<Connection::TableSchemaChangeListenerInterface>*
+ TQPtrList<Connection::TableSchemaChangeListenerInterface>*
tableSchemaChangeListeners(TableSchema& tableSchema) const;
tristate closeAllTableSchemaChangeListeners(TableSchema& tableSchema);
@@ -781,7 +782,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
This method is used for example in KexiProject to insert information about "kexi__blobs"
table schema. Use createTable() to physically create table. After createTable()
calling insertInternalTableSchema() is not required.
- Also used internally by newKexiDBSystemTableSchema(const QString& tsname) */
+ Also used internally by newKexiDBSystemTableSchema(const TQString& tsname) */
void insertInternalTableSchema(TableSchema *tableSchema);
//! @todo move this somewhere to low level class (MIGRATION?)
@@ -789,7 +790,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
with name \a tableName exists in the database.
\return false if it does not exist or error occurred.
The lookup is case insensitive. */
- virtual bool drv_containsTable( const QString &tableName ) = 0;
+ virtual bool drv_containsTable( const TQString &tableName ) = 0;
/*! Creates table using \a tableSchema information.
\return true on success. Default implementation
@@ -813,7 +814,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Moved to public for KexiProject.
@todo fix this after refactoring
*/
- virtual bool drv_alterTableName(TableSchema& tableSchema, const QString& newName);
+ virtual bool drv_alterTableName(TableSchema& tableSchema, const TQString& newName);
/*! Physically drops table named with \a name.
Default impelmentation executes "DROP TABLE.." command,
@@ -822,13 +823,13 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Moved to public for KexiMigrate
@todo fix this after refatoring
*/
- virtual bool drv_dropTable( const QString& name );
+ virtual bool drv_dropTable( const TQString& name );
/*! Prepare a SQL statement and return a \a PreparedStatement instance. */
virtual PreparedStatement::Ptr prepareStatement(PreparedStatement::StatementType type,
FieldList& fields) = 0;
- bool isInternalTableSchema(const QString& tableName);
+ bool isInternalTableSchema(const TQString& tableName);
/*! Setups schema data for object that owns sdata (e.g. table, query)
using \a cursor opened on 'kexi__objects' table, pointing to a record
@@ -874,7 +875,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! Executes query \a statement, but without returning resulting
rows (used mostly for functional queries).
Only use this method if you really need. */
- virtual bool drv_executeSQL( const QString& statement ) = 0;
+ virtual bool drv_executeSQL( const TQString& statement ) = 0;
/*! For reimplemenation: loads list of databases' names available for this connection
and adds these names to \a list. If your server is not able to offer such a list,
@@ -882,18 +883,18 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
The method should return true only if there was no error on getting database names
list from the server.
Default implementation puts empty list into \a list and returns true. */
- virtual bool drv_getDatabasesList( QStringList &list );
+ virtual bool drv_getDatabasesList( TQStringList &list );
//! @todo move this somewhere to low level class (MIGRATION?)
/*! LOW LEVEL METHOD. For reimplemenation: loads low-level list of table names
available for this connection. The names are in lower case.
The method should return true only if there was no error on getting database names
list from the server. */
- virtual bool drv_getTablesList( QStringList &list ) = 0;
+ virtual bool drv_getTablesList( TQStringList &list ) = 0;
/*! For optional reimplemenation: asks server if database \a dbName exists.
This method is used internally in databaseExists(). The default implementation
- calls databaseNames and checks if that list contains \a dbName. If you need to
+ calls databaseNames and checks if that list tqcontains \a dbName. If you need to
ask the server specifically if a database exists, eg. if you can't retrieve a list
of all available database names, please reimplement this method and do all
needed checks.
@@ -903,14 +904,14 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Note: This method should also work if there is already database used (with useDatabase());
in this situation no changes should be made in current database selection. */
- virtual bool drv_databaseExists( const QString &dbName, bool ignoreErrors = true );
+ virtual bool drv_databaseExists( const TQString &dbName, bool ignoreErrors = true );
/*! For reimplemenation: creates new database using connection */
- virtual bool drv_createDatabase( const QString &dbName = QString::null ) = 0;
+ virtual bool drv_createDatabase( const TQString &dbName = TQString() ) = 0;
/*! For reimplemenation: opens existing database using connection
\return true on success, false on failure and cancelled if user has cancelled this action. */
- virtual bool drv_useDatabase( const QString &dbName = QString::null, bool *cancelled = 0,
+ virtual bool drv_useDatabase( const TQString &dbName = TQString(), bool *cancelled = 0,
MessageHandler* msgHandler = 0 ) = 0;
/*! For reimplemenation: closes previously opened database
@@ -935,7 +936,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! For reimplemenation: drops database from the server
using connection. After drop, database shouldn't be accessible
anymore. */
- virtual bool drv_dropDatabase( const QString &dbName = QString::null ) = 0;
+ virtual bool drv_dropDatabase( const TQString &dbName = TQString() ) = 0;
/*! \return "CREATE TABLE ..." statement string needed for \a tableSchema
creation in the database.
@@ -943,7 +944,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Note: The statement string can be specific for this connection's driver database,
and thus not reusable in general.
*/
- QString createTableStatement( const TableSchema& tableSchema ) const;
+ TQString createTableStatement( const TableSchema& tableSchema ) const;
/*! \return "SELECT ..." statement's string needed for executing query
@@ -953,7 +954,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Note: The statement string can be specific for this connection's driver database,
and thus not reusable in general.
*/
- QString selectStatement( TableSchema& tableSchema,
+ TQString selectStatement( TableSchema& tableSchema,
const SelectStatementOptions& options = SelectStatementOptions() ) const;
/*!
@@ -963,11 +964,11 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Used internally, e.g. in createDatabase().
\return true on success
*/
- virtual bool drv_createTable( const QString& tableSchemaName );
+ virtual bool drv_createTable( const TQString& tableSchemaName );
// /*! Executes query \a statement and returns resulting rows
// (used mostly for SELECT query). */
-// virtual bool drv_executeQuery( const QString& statement ) = 0;
+// virtual bool drv_executeQuery( const TQString& statement ) = 0;
/*! \return unique identifier of last inserted row.
Typically this is just primary key value.
@@ -975,7 +976,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
just inserted row.
Note for driver developers: contact js (at) iidea.pl
if your engine do not offers this information. */
- virtual Q_ULLONG drv_lastInsertRowID() = 0;
+ virtual TQ_ULLONG drv_lastInsertRowID() = 0;
/*! Note for driver developers: begins new transaction
and returns handle to it. Default implementation just
@@ -1065,7 +1066,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! Creates cursor data and initializes cursor
using \a statement for later data retrieval. */
-// virtual CursorData* drv_createCursor( const QString& statement ) = 0;
+// virtual CursorData* drv_createCursor( const TQString& statement ) = 0;
/*! Closes and deletes cursor data. */
// virtual bool drv_deleteCursor( CursorData *data ) = 0;
@@ -1106,7 +1107,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Allocates single table KexiDB system object named \a tsname
and adds this to list of such objects (for later removal on closeDatabase()).
*/
- TableSchema* newKexiDBSystemTableSchema(const QString& tsname);
+ TableSchema* newKexiDBSystemTableSchema(const TQString& tsname);
//! Identifier escaping function in the associated Driver.
/*! Calls the identifier escaping function in the associated Driver to
@@ -1120,7 +1121,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
For efficiency, kexi__* system tables and columns therein are not escaped
- we assume these are valid identifiers for all drivers.
*/
- inline QString escapeIdentifier(const QString& id,
+ inline TQString escapeIdentifier(const TQString& id,
int escaping = Driver::EscapeDriver|Driver::EscapeAsNecessary ) const {
return m_driver->escapeIdentifier(id, escaping);
}
@@ -1136,7 +1137,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! @internal used by querySingleRecord() methods.
Note: "LIMIT 1" is appended to \a sql statement if \a addLimitTo1 is true (the default). */
- tristate querySingleRecordInternal(RowData &data, const QString* sql,
+ tristate querySingleRecordInternal(RowData &data, const TQString* sql,
QuerySchema* query, bool addLimitTo1 = true);
/*! @internal used by Driver::createConnection().
@@ -1172,12 +1173,12 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Note for driver developers: implement this if the driver has to support the altering. */
virtual tristate drv_changeFieldProperty(TableSchema &table, Field& field,
- const QString& propertyName, const QVariant& value) {
+ const TQString& propertyName, const TQVariant& value) {
Q_UNUSED(table); Q_UNUSED(field); Q_UNUSED(propertyName); Q_UNUSED(value);
return cancelled; }
//! cursors created for this connection
- QPtrDict<KexiDB::Cursor> m_cursors;
+ TQPtrDict<KexiDB::Cursor> m_cursors;
private:
ConnectionPrivate* d; //!< @internal d-pointer class.