diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-01-11 16:53:26 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-01-11 16:53:26 -0600 |
commit | c91e96258b6c127201397dd5309c4433655e63b2 (patch) | |
tree | 85682ed6f7056b51a95e85cf1711ffcc74588d34 /kexi/migration/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/migration/pqxx')
-rw-r--r-- | kexi/migration/pqxx/pqxxmigrate.cpp | 10 |
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; |