summaryrefslogtreecommitdiffstats
path: root/kexi/kexidb/preparedstatement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/kexidb/preparedstatement.cpp')
-rw-r--r--kexi/kexidb/preparedstatement.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/kexi/kexidb/preparedstatement.cpp b/kexi/kexidb/preparedstatement.cpp
index 24947dff..ce96f630 100644
--- a/kexi/kexidb/preparedstatement.cpp
+++ b/kexi/kexidb/preparedstatement.cpp
@@ -26,11 +26,11 @@
using namespace KexiDB;
PreparedStatement::PreparedStatement(StatementType type, ConnectionInternal& conn,
- FieldList& fields, const QStringList& where)
+ FieldList& fields, const TQStringList& where)
: KShared()
, m_type(type)
, m_fields(&fields)
- , m_where(where.isEmpty() ? new QStringList(where) : 0)
+ , m_where(where.isEmpty() ? new TQStringList(where) : 0)
, m_whereFields(0)
{
Q_UNUSED(conn);
@@ -42,9 +42,9 @@ PreparedStatement::~PreparedStatement()
delete m_whereFields;
}
-QCString PreparedStatement::generateStatementString()
+TQCString PreparedStatement::generateStatementString()
{
- QCString s(1024);
+ TQCString s(1024);
if (m_type == SelectStatement) {
//! @todo only tables and trivial queries supported for select...
s = "SELECT ";
@@ -62,7 +62,7 @@ QCString PreparedStatement::generateStatementString()
// for (uint i=0; i<m_fields->fieldCount(); i++) {
m_whereFields = new Field::List();
- for (QStringList::ConstIterator it=m_where->constBegin(); it!=m_where->constEnd(); ++it) {
+ for (TQStringList::ConstIterator it=m_where->constBegin(); it!=m_where->constEnd(); ++it) {
// for (Field::ListIterator it(m_fields->fieldsIterator()); it.current(); ++it) {
if (first)
first = false;
@@ -86,7 +86,7 @@ QCString PreparedStatement::generateStatementString()
if (!table)
return ""; //err
- QCString namesList;
+ TQCString namesList;
bool first = true;
const bool allTableFieldsUsed = dynamic_cast<TableSchema*>(m_fields); //we are using a selection of fields only
Field::ListIterator it = m_fields->fieldsIterator();
@@ -99,18 +99,18 @@ QCString PreparedStatement::generateStatementString()
} else {
s.append( ",?" );
if (!allTableFieldsUsed)
- namesList.append(QCString(", ")+it.current()->name().latin1());
+ namesList.append(TQCString(", ")+it.current()->name().latin1());
}
}
s.append(")");
- s.prepend(QCString("INSERT INTO ") + table->name().latin1()
- + (allTableFieldsUsed ? QCString() : (" (" + namesList + ")"))
+ s.prepend(TQCString("INSERT INTO ") + table->name().latin1()
+ + (allTableFieldsUsed ? TQCString() : (" (" + namesList + ")"))
+ " VALUES (");
}
return s;
}
-PreparedStatement& PreparedStatement::operator<< ( const QVariant& value )
+PreparedStatement& PreparedStatement::operator<< ( const TQVariant& value )
{
m_args.append(value);
return *this;