summaryrefslogtreecommitdiffstats
path: root/src/sql/drivers/db2
diff options
context:
space:
mode:
authorBill King <bill.king@nokia.com>2009-06-12 00:29:44 (GMT)
committerBill King <bill.king@nokia.com>2009-06-15 00:31:07 (GMT)
commitc9f77564df14f91276e9ca693a9b3f339dab9334 (patch)
tree5c87e861a3973433c2b01ece730164d63a5dab95 /src/sql/drivers/db2
parentba097c23159c1ec026b8b8772d1a9c5e72f2a681 (diff)
downloadQt-c9f77564df14f91276e9ca693a9b3f339dab9334.zip
Qt-c9f77564df14f91276e9ca693a9b3f339dab9334.tar.gz
Qt-c9f77564df14f91276e9ca693a9b3f339dab9334.tar.bz2
Stage 1 of incorporating database level precision policy.
Queries now ask the database object what precision they should be, allows for setting precision policies on sql models, where previously this was not available. Also fixes some failing precisionpolicy implementations, as well as working around the fact qstring can't convert from "123.00" to an int based type.
Diffstat (limited to 'src/sql/drivers/db2')
-rw-r--r--src/sql/drivers/db2/qsql_db2.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/sql/drivers/db2/qsql_db2.cpp b/src/sql/drivers/db2/qsql_db2.cpp
index c7cbc9b..b8f52f4 100644
--- a/src/sql/drivers/db2/qsql_db2.cpp
+++ b/src/sql/drivers/db2/qsql_db2.cpp
@@ -84,7 +84,7 @@ public:
class QDB2ResultPrivate
{
public:
- QDB2ResultPrivate(const QDB2DriverPrivate* d): dp(d), hStmt(0), precisionPolicy(QSql::HighPrecision)
+ QDB2ResultPrivate(const QDB2DriverPrivate* d): dp(d), hStmt(0)
{}
~QDB2ResultPrivate()
{
@@ -107,7 +107,6 @@ public:
SQLHANDLE hStmt;
QSqlRecord recInf;
QVector<QVariant*> valueCache;
- QSql::NumericalPrecisionPolicy precisionPolicy;
};
static QString qFromTChar(SQLTCHAR* str)
@@ -1147,10 +1146,6 @@ void QDB2Result::virtual_hook(int id, void *data)
Q_ASSERT(data);
*static_cast<bool*>(data) = nextResult();
break;
- case QSqlResult::SetNumericalPrecision:
- Q_ASSERT(data);
- d->precisionPolicy = *reinterpret_cast<QSql::NumericalPrecisionPolicy *>(data);
- break;
default:
QSqlResult::virtual_hook(id, data);
}