summaryrefslogtreecommitdiffstats
path: root/kexi/migration/pqxx/pqxxmigrate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/migration/pqxx/pqxxmigrate.cpp')
-rw-r--r--kexi/migration/pqxx/pqxxmigrate.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/kexi/migration/pqxx/pqxxmigrate.cpp b/kexi/migration/pqxx/pqxxmigrate.cpp
index 904e0c92..2ca476d4 100644
--- a/kexi/migration/pqxx/pqxxmigrate.cpp
+++ b/kexi/migration/pqxx/pqxxmigrate.cpp
@@ -538,10 +538,18 @@ bool PqxxMigrate::drv_copyTable(const TQString& srcTable, KexiDB::Connection *de
int index = 0;
for ( i = R.begin(); i != end; ++i, index++) {
if (fieldsExpanded.at(index)->field->type()==KexiDB::Field::BLOB || fieldsExpanded.at(index)->field->type()==KexiDB::Field::LongText)
+ {
vals.append( KexiDB::pgsqlByteaToByteArray((*i).c_str(), (*i).size()) );
- else
+ }
+ else if (fieldsExpanded.at(index)->field->type()==KexiDB::Field::Boolean )
+ {
+ vals.append(QString((*i).c_str()).lower() == "t" ? QVariant(true, 1) : QVariant(false, 1));
+ }
+ else
+ {
vals.append( KexiDB::cstringToVariant((*i).c_str(),
fieldsExpanded.at(index)->field, (*i).size()) );
+ }
}
if (!destConn->insertRecord(*dstTable, vals))
return false;