summaryrefslogtreecommitdiffstats
path: root/kjsembed/bindings/sql_imp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kjsembed/bindings/sql_imp.cpp')
-rw-r--r--kjsembed/bindings/sql_imp.cpp98
1 files changed, 49 insertions, 49 deletions
diff --git a/kjsembed/bindings/sql_imp.cpp b/kjsembed/bindings/sql_imp.cpp
index 5fa9782f..3d7e9578 100644
--- a/kjsembed/bindings/sql_imp.cpp
+++ b/kjsembed/bindings/sql_imp.cpp
@@ -30,44 +30,44 @@
namespace KJSEmbed {
namespace Bindings {
-SqlDatabase::SqlDatabase( TQObject *parent, const char *name): BindingObject(parent, name)
+SqlDatabase::SqlDatabase( TTQObject *parent, const char *name): BindingObject(parent, name)
{
connectionName = "defaultConnection";
setJSClassName( "SqlDatabase" );
}
SqlDatabase::~SqlDatabase()
{
- TQSqlDatabase::removeDatabase(connectionName);
+ TTQSqlDatabase::removeDatabase(connectionName);
}
-bool SqlDatabase::addDatabase ( const TQString &type, const TQString &conn )
+bool SqlDatabase::addDatabase ( const TTQString &type, const TTQString &conn )
{
connectionName = conn;
- TQSqlDatabase *db = TQSqlDatabase::addDatabase(type, connectionName);
+ TTQSqlDatabase *db = TTQSqlDatabase::addDatabase(type, connectionName);
if ( !db )
return false;
return true;
}
-TQStringList SqlDatabase::drivers ()
+TTQStringList SqlDatabase::drivers ()
{
- return TQSqlDatabase::drivers();
+ return TTQSqlDatabase::drivers();
}
bool SqlDatabase::open ( )
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
return db->open();
return false;
}
-bool SqlDatabase::open ( const TQString &user, const TQString &password )
+bool SqlDatabase::open ( const TTQString &user, const TTQString &password )
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
return db->open(user, password);
return false;
}
void SqlDatabase::close ()
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
{
db->close();
@@ -75,28 +75,28 @@ void SqlDatabase::close ()
}
bool SqlDatabase::isOpen ()
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
return db->isOpen();
return false;
}
bool SqlDatabase::isOpenError ()
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
return db->isOpenError();
return true;
}
-TQStringList SqlDatabase::tables ()
+TTQStringList SqlDatabase::tables ()
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
return db->tables();
- return TQStringList();
+ return TTQStringList();
}
-SqlQuery *SqlDatabase::exec (const TQString &query )
+SqlQuery *SqlDatabase::exec (const TTQString &query )
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
{
kdDebug() <<" exec query " << query << endl;
@@ -108,9 +108,9 @@ SqlQuery *SqlDatabase::exec (const TQString &query )
}
return 0L;
}
-TQString SqlDatabase::lastError () const
+TTQString SqlDatabase::lastError () const
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
{
return db->lastError().text();
@@ -119,105 +119,105 @@ TQString SqlDatabase::lastError () const
}
bool SqlDatabase::transaction ()
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
return db->transaction();
return false;
}
bool SqlDatabase::commit ()
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
return db->commit();
return false;
}
bool SqlDatabase::rollback ()
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
return db->rollback();
return false;
}
-void SqlDatabase::setDatabaseName (const TQString &name )
+void SqlDatabase::setDatabaseName (const TTQString &name )
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
db->setDatabaseName(name);
}
-void SqlDatabase::setUserName (const TQString &name )
+void SqlDatabase::setUserName (const TTQString &name )
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
db->setUserName(name);
}
-void SqlDatabase::setPassword (const TQString &password )
+void SqlDatabase::setPassword (const TTQString &password )
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
db->setPassword(password);
}
-void SqlDatabase::setHostName (const TQString &host )
+void SqlDatabase::setHostName (const TTQString &host )
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
db->setHostName(host);
}
void SqlDatabase::setPort ( int p )
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
db->setPort(p);
}
-TQString SqlDatabase::databaseName () const
+TTQString SqlDatabase::databaseName () const
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
return db->databaseName();
return "";
}
-TQString SqlDatabase::userName () const
+TTQString SqlDatabase::userName () const
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
return db->userName();
return "";
}
-TQString SqlDatabase::password () const
+TTQString SqlDatabase::password () const
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
return db->password();
return "";
}
-TQString SqlDatabase::hostName () const
+TTQString SqlDatabase::hostName () const
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
return db->hostName();
return "";
}
-TQString SqlDatabase::driverName () const
+TTQString SqlDatabase::driverName () const
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
return db->driverName();
return "";
}
int SqlDatabase::port () const
{
- TQSqlDatabase *db = TQSqlDatabase::database(connectionName,false);
+ TTQSqlDatabase *db = TTQSqlDatabase::database(connectionName,false);
if ( db )
return db->port();
return 0;
}
-SqlQuery::SqlQuery( TQObject *parent, const char *name ): BindingObject(parent, name)
+SqlQuery::SqlQuery( TTQObject *parent, const char *name ): BindingObject(parent, name)
{
kdDebug() << "New null SQL Query" << endl;
- m_query = TQSqlQuery();
+ m_query = TTQSqlQuery();
setJSClassName( "SqlQuery" );
}
-SqlQuery::SqlQuery( TQObject *parent, const char *name, const TQSqlQuery &q ): BindingObject(parent, name)
+SqlQuery::SqlQuery( TTQObject *parent, const char *name, const TTQSqlQuery &q ): BindingObject(parent, name)
{
kdDebug() << "New SQL Query with argument" << endl;
m_query = q;
@@ -252,7 +252,7 @@ int SqlQuery::at () const
{
return m_query.at();
}
-TQString SqlQuery::lastQuery () const
+TTQString SqlQuery::lastQuery () const
{
kdDebug() << "Last query error: " << m_query.lastQuery() << endl;
return m_query.lastQuery();
@@ -261,7 +261,7 @@ int SqlQuery::numRowsAffected () const
{
return m_query.numRowsAffected();
}
-TQString SqlQuery::lastError () const
+TTQString SqlQuery::lastError () const
{
return m_query.lastError().text();
}
@@ -273,11 +273,11 @@ int SqlQuery::size () const
{
return m_query.size();
}
-bool SqlQuery::exec ( const TQString & query )
+bool SqlQuery::exec ( const TTQString & query )
{
return m_query.exec( query );
}
-TQVariant SqlQuery::value ( int i )
+TTQVariant SqlQuery::value ( int i )
{
return m_query.value(i);
}