OCI: Use correct type for getting doubles
Change-Id: Iffb81a37a517e58d48757d82f93f20e8c5100033 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
83122b1932
commit
2d168af7d7
@ -72,7 +72,13 @@ void tst_QSqlDriver::recreateTestTables(QSqlDatabase db)
|
||||
QVERIFY_SQL( q, exec("set client_min_messages='warning'"));
|
||||
|
||||
tst_Databases::safeDropTable( db, relTEST1 );
|
||||
QString doubleField = (dbType == QSqlDriver::SQLite) ? "more_data double" : "more_data double(8,7)";
|
||||
QString doubleField;
|
||||
if (dbType == QSqlDriver::SQLite)
|
||||
doubleField = "more_data double";
|
||||
else if (dbType == QSqlDriver::Oracle)
|
||||
doubleField = "more_data number(8,7)";
|
||||
else
|
||||
doubleField = "more_data double(8,7)";
|
||||
QVERIFY_SQL( q, exec("create table " + relTEST1 +
|
||||
" (id int not null primary key, name varchar(20), title_key int, another_title_key int, " + doubleField + QLatin1Char(')')));
|
||||
QVERIFY_SQL( q, exec("insert into " + relTEST1 + " values(1, 'harry', 1, 2, 1.234567)"));
|
||||
|
Loading…
Reference in New Issue
Block a user