diff options
author | Timothy Pearson <[email protected]> | 2012-01-11 16:53:26 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-01-11 16:53:26 -0600 |
commit | c91e96258b6c127201397dd5309c4433655e63b2 (patch) | |
tree | 85682ed6f7056b51a95e85cf1711ffcc74588d34 /kexi/kexidb/drivers/pqxx | |
parent | 5ec453c2580654ef1d9c019964fa3b9cf3c601a9 (diff) | |
download | koffice-c91e96258b6c127201397dd5309c4433655e63b2.tar.gz koffice-c91e96258b6c127201397dd5309c4433655e63b2.zip |
Apply a number of kexi patches
This closes Bug 777
Diffstat (limited to 'kexi/kexidb/drivers/pqxx')
-rw-r--r-- | kexi/kexidb/drivers/pqxx/pqxxcursor.cpp | 8 |
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 { |