blob: dd8ee6ae7d4ba149c85561da280b05fc7a79432d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
--- kexi/kexidb/drivers/pqxx/pqxxcursor.cpp 2007/10/25 14:56:36 729302
+++ kexi/kexidb/drivers/pqxx/pqxxcursor.cpp 2008/04/30 09:54:43 802697
@@ -236,12 +236,20 @@
{
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
{
|