blob: 7509946b227662a11b71e6e11e997da7787fa3fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
--- kexi/migration/pqxx/pqxxmigrate.cpp 2006/12/17 21:08:15 614463
+++ kexi/migration/pqxx/pqxxmigrate.cpp 2008/04/30 09:54:43 802697
@@ -538,10 +538,18 @@
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;
|