From c91e96258b6c127201397dd5309c4433655e63b2 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 11 Jan 2012 16:53:26 -0600 Subject: Apply a number of kexi patches This closes Bug 777 --- kexi/kexidb/drivers/pqxx/pqxxcursor.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'kexi/kexidb/drivers/pqxx') 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 { -- cgit v1.2.1