summaryrefslogtreecommitdiffstats
path: root/src/sql/tqsqldatabase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sql/tqsqldatabase.cpp')
-rw-r--r--src/sql/tqsqldatabase.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/src/sql/tqsqldatabase.cpp b/src/sql/tqsqldatabase.cpp
index f818a8f62..4734c2d09 100644
--- a/src/sql/tqsqldatabase.cpp
+++ b/src/sql/tqsqldatabase.cpp
@@ -120,11 +120,11 @@ public:
~TQNullResult(){}
protected:
TQVariant data( int ) { return TQVariant(); }
- bool reset ( const TQString& sqlquery ) { TQString s(sqlquery); return FALSE; }
- bool fetch( int i ) { i = i; return FALSE; }
- bool fetchFirst() { return FALSE; }
- bool fetchLast() { return FALSE; }
- bool isNull( int ) {return FALSE; }
+ bool reset ( const TQString& sqlquery ) { TQString s(sqlquery); return false; }
+ bool fetch( int i ) { i = i; return false; }
+ bool fetchFirst() { return false; }
+ bool fetchLast() { return false; }
+ bool isNull( int ) {return false; }
TQSqlRecord record() {return TQSqlRecord();}
int size() {return 0;}
int numRowsAffected() {return 0;}
@@ -135,16 +135,16 @@ class TQNullDriver : public TQSqlDriver
public:
TQNullDriver(): TQSqlDriver(){}
~TQNullDriver(){}
- bool hasFeature( DriverFeature /* f */ ) const { return FALSE; } ;
+ bool hasFeature( DriverFeature /* f */ ) const { return false; } ;
bool open( const TQString & ,
const TQString & ,
const TQString & ,
const TQString &,
int ) {
- return FALSE;
+ return false;
}
void close() {}
- bool ping() { return TRUE; }
+ bool ping() { return true; }
TQSqlQuery createQuery() const { return TQSqlQuery( new TQNullResult(this) ); }
};
@@ -208,7 +208,7 @@ TQDriverDict* TQSqlDatabaseManager::driverDict()
TQSqlDatabaseManager* sqlConnection = instance();
if ( !sqlConnection->drDict ) {
sqlConnection->drDict = new TQDriverDict();
- sqlConnection->drDict->setAutoDelete( TRUE );
+ sqlConnection->drDict->setAutoDelete( true );
}
return sqlConnection->drDict;
}
@@ -233,7 +233,7 @@ TQSqlDatabaseManager* TQSqlDatabaseManager::instance()
/*!
Returns the database connection called \a name. If \a open is
- TRUE, the database connection is opened. If \a name does not exist
+ true, the database connection is opened. If \a name does not exist
in the list of managed databases, 0 is returned.
*/
@@ -256,8 +256,8 @@ TQSqlDatabase* TQSqlDatabaseManager::database( const TQString& name, bool open )
}
/*!
- Returns TRUE if the list of database connections contains \a name;
- otherwise returns FALSE.
+ Returns true if the list of database connections contains \a name;
+ otherwise returns false.
*/
bool TQSqlDatabaseManager::contains( const TQString& name )
@@ -265,8 +265,8 @@ bool TQSqlDatabaseManager::contains( const TQString& name )
TQSqlDatabaseManager* sqlConnection = instance();
TQSqlDatabase* db = sqlConnection->dbDict.find( name );
if ( db )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
@@ -308,9 +308,9 @@ TQSqlDatabase* TQSqlDatabaseManager::addDatabase( TQSqlDatabase* db, const TQStr
void TQSqlDatabaseManager::removeDatabase( const TQString& name )
{
TQSqlDatabaseManager* sqlConnection = instance();
- sqlConnection->dbDict.setAutoDelete( TRUE );
+ sqlConnection->dbDict.setAutoDelete( true );
sqlConnection->dbDict.remove( name );
- sqlConnection->dbDict.setAutoDelete( FALSE );
+ sqlConnection->dbDict.setAutoDelete( false );
}
@@ -417,7 +417,7 @@ TQSqlDatabase* TQSqlDatabase::addDatabase( const TQString& type, const TQString&
/*!
Returns the database connection called \a connectionName. The
database connection must have been previously added with
- addDatabase(). If \a open is TRUE (the default) and the database
+ addDatabase(). If \a open is true (the default) and the database
connection is not already open it is opened now. If no \a
connectionName is specified the default connection is used. If \a
connectionName does not exist in the list of databases, 0 is
@@ -565,8 +565,8 @@ void TQSqlDatabase::registerSqlDriver( const TQString& name, const TQSqlDriverCr
}
/*!
- Returns TRUE if the list of database connections contains \a
- connectionName; otherwise returns FALSE.
+ Returns true if the list of database connections contains \a
+ connectionName; otherwise returns false.
*/
bool TQSqlDatabase::contains( const TQString& connectionName )
@@ -752,7 +752,7 @@ TQSqlQuery TQSqlDatabase::exec( const TQString & query ) const
/*!
Opens the database connection using the current connection values.
- Returns TRUE on success; otherwise returns FALSE. Error
+ Returns true on success; otherwise returns false. Error
information can be retrieved using the lastError() function.
\sa lastError()
@@ -768,7 +768,7 @@ bool TQSqlDatabase::open()
\overload
Opens the database connection using the given \a user name and \a
- password. Returns TRUE on success; otherwise returns FALSE. Error
+ password. Returns true on success; otherwise returns false. Error
information can be retrieved using the lastError() function.
This function does not store the password it is given. Instead,
@@ -806,8 +806,8 @@ bool TQSqlDatabase::ping()
}
/*!
- Returns TRUE if the database connection is currently open;
- otherwise returns FALSE.
+ Returns true if the database connection is currently open;
+ otherwise returns false.
*/
bool TQSqlDatabase::isOpen() const
@@ -816,8 +816,8 @@ bool TQSqlDatabase::isOpen() const
}
/*!
- Returns TRUE if there was an error opening the database
- connection; otherwise returns FALSE. Error information can be
+ Returns true if there was an error opening the database
+ connection; otherwise returns false. Error information can be
retrieved using the lastError() function.
*/
@@ -828,8 +828,8 @@ bool TQSqlDatabase::isOpenError() const
/*!
Begins a transaction on the database if the driver supports
- transactions. Returns TRUE if the operation succeeded; otherwise
- returns FALSE.
+ transactions. Returns true if the operation succeeded; otherwise
+ returns false.
\sa TQSqlDriver::hasFeature() commit() rollback()
*/
@@ -837,14 +837,14 @@ bool TQSqlDatabase::isOpenError() const
bool TQSqlDatabase::transaction()
{
if ( !d->driver->hasFeature( TQSqlDriver::Transactions ) )
- return FALSE;
+ return false;
return d->driver->beginTransaction();
}
/*!
Commits a transaction to the database if the driver supports
- transactions. Returns TRUE if the operation succeeded; otherwise
- returns FALSE.
+ transactions. Returns true if the operation succeeded; otherwise
+ returns false.
\sa TQSqlDriver::hasFeature() rollback()
*/
@@ -852,14 +852,14 @@ bool TQSqlDatabase::transaction()
bool TQSqlDatabase::commit()
{
if ( !d->driver->hasFeature( TQSqlDriver::Transactions ) )
- return FALSE;
+ return false;
return d->driver->commitTransaction();
}
/*!
Rolls a transaction back on the database if the driver supports
- transactions. Returns TRUE if the operation succeeded; otherwise
- returns FALSE.
+ transactions. Returns true if the operation succeeded; otherwise
+ returns false.
\sa TQSqlDriver::hasFeature() commit() transaction()
*/
@@ -867,7 +867,7 @@ bool TQSqlDatabase::commit()
bool TQSqlDatabase::rollback()
{
if ( !d->driver->hasFeature( TQSqlDriver::Transactions ) )
- return FALSE;
+ return false;
return d->driver->rollbackTransaction();
}
@@ -1229,8 +1229,8 @@ TQString TQSqlDatabase::connectOptions() const
}
/*!
- Returns TRUE if a driver called \a name is available; otherwise
- returns FALSE.
+ Returns true if a driver called \a name is available; otherwise
+ returns false.
\sa drivers()
*/
@@ -1241,9 +1241,9 @@ bool TQSqlDatabase::isDriverAvailable( const TQString& name )
TQStringList::ConstIterator it = l.begin();
for ( ;it != l.end(); ++it ) {
if ( *it == name )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*! \overload