summaryrefslogtreecommitdiffstats
path: root/kexi/kexidb/drivers/pqxx
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/kexidb/drivers/pqxx')
-rw-r--r--kexi/kexidb/drivers/pqxx/pqxxcursor.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp b/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp
index afcad047..3b5de6f9 100644
--- a/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp
+++ b/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp
@@ -237,12 +237,20 @@ TQVariant pqxxSqlCursor::pValue(uint pos)const
{
return (*m_res)[at()][pos].as(double());
}
+ else if (f->type() == Field::Boolean )
+ {
+ return QString((*m_res)[at()][pos].c_str()).lower() == "t" ? QVariant(true, 1) : QVariant(false, 1);
+ }
else if (f->typeGroup() == Field::BLOBGroup)
{
// pqxx::result::field r = (*m_res)[at()][pos];
// kdDebug() << r.name() << ", " << r.c_str() << ", " << r.type() << ", " << r.size() << endl;
return ::pgsqlByteaToByteArray((*m_res)[at()][pos]);
}
+ else
+ {
+ return pgsqlCStrToVariant((*m_res)[at()][pos]);
+ }
}
else // We probably have a raw type query so use pqxx to determin the column type
{