Remove use of QFlag in the SQL drivers
It's not clear why they were added, but they aren't needed anymore. Change-Id: I1d919deefdbd6a71fa255eeac1a8543c33ba390d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
parent
c35b55f076
commit
1411a6f1ac
@ -633,7 +633,7 @@ bool QDB2Result::exec()
|
|||||||
dt->day = qdt.day();
|
dt->day = qdt.day();
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & 3],
|
qParamType[bindValueType(i) & 3],
|
||||||
SQL_C_DATE,
|
SQL_C_DATE,
|
||||||
SQL_DATE,
|
SQL_DATE,
|
||||||
0,
|
0,
|
||||||
@ -653,7 +653,7 @@ bool QDB2Result::exec()
|
|||||||
dt->second = qdt.second();
|
dt->second = qdt.second();
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & 3],
|
qParamType[bindValueType(i) & 3],
|
||||||
SQL_C_TIME,
|
SQL_C_TIME,
|
||||||
SQL_TIME,
|
SQL_TIME,
|
||||||
0,
|
0,
|
||||||
@ -677,7 +677,7 @@ bool QDB2Result::exec()
|
|||||||
dt->fraction = qdt.time().msec() * 1000000;
|
dt->fraction = qdt.time().msec() * 1000000;
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & 3],
|
qParamType[bindValueType(i) & 3],
|
||||||
SQL_C_TIMESTAMP,
|
SQL_C_TIMESTAMP,
|
||||||
SQL_TIMESTAMP,
|
SQL_TIMESTAMP,
|
||||||
0,
|
0,
|
||||||
@ -690,7 +690,7 @@ bool QDB2Result::exec()
|
|||||||
case QVariant::Int:
|
case QVariant::Int:
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & 3],
|
qParamType[bindValueType(i) & 3],
|
||||||
SQL_C_SLONG,
|
SQL_C_SLONG,
|
||||||
SQL_INTEGER,
|
SQL_INTEGER,
|
||||||
0,
|
0,
|
||||||
@ -702,7 +702,7 @@ bool QDB2Result::exec()
|
|||||||
case QVariant::Double:
|
case QVariant::Double:
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & 3],
|
qParamType[bindValueType(i) & 3],
|
||||||
SQL_C_DOUBLE,
|
SQL_C_DOUBLE,
|
||||||
SQL_DOUBLE,
|
SQL_DOUBLE,
|
||||||
0,
|
0,
|
||||||
@ -717,7 +717,7 @@ bool QDB2Result::exec()
|
|||||||
*ind = len;
|
*ind = len;
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & 3],
|
qParamType[bindValueType(i) & 3],
|
||||||
SQL_C_BINARY,
|
SQL_C_BINARY,
|
||||||
SQL_LONGVARBINARY,
|
SQL_LONGVARBINARY,
|
||||||
len,
|
len,
|
||||||
@ -735,7 +735,7 @@ bool QDB2Result::exec()
|
|||||||
QByteArray ba((char*)str.utf16(), str.capacity() * sizeof(QChar));
|
QByteArray ba((char*)str.utf16(), str.capacity() * sizeof(QChar));
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & 3],
|
qParamType[bindValueType(i) & 3],
|
||||||
SQL_C_WCHAR,
|
SQL_C_WCHAR,
|
||||||
SQL_WVARCHAR,
|
SQL_WVARCHAR,
|
||||||
str.length(),
|
str.length(),
|
||||||
@ -749,7 +749,7 @@ bool QDB2Result::exec()
|
|||||||
int len = str.length();
|
int len = str.length();
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & 3],
|
qParamType[bindValueType(i) & 3],
|
||||||
SQL_C_WCHAR,
|
SQL_C_WCHAR,
|
||||||
SQL_WVARCHAR,
|
SQL_WVARCHAR,
|
||||||
len,
|
len,
|
||||||
@ -767,7 +767,7 @@ bool QDB2Result::exec()
|
|||||||
*ind = ba.length();
|
*ind = ba.length();
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & 3],
|
qParamType[bindValueType(i) & 3],
|
||||||
SQL_C_CHAR,
|
SQL_C_CHAR,
|
||||||
SQL_VARCHAR,
|
SQL_VARCHAR,
|
||||||
len,
|
len,
|
||||||
|
@ -1349,7 +1349,7 @@ bool QODBCResult::exec()
|
|||||||
dt->day = qdt.day();
|
dt->day = qdt.day();
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & QSql::InOut],
|
qParamType[bindValueType(i) & QSql::InOut],
|
||||||
SQL_C_DATE,
|
SQL_C_DATE,
|
||||||
SQL_DATE,
|
SQL_DATE,
|
||||||
0,
|
0,
|
||||||
@ -1369,7 +1369,7 @@ bool QODBCResult::exec()
|
|||||||
dt->second = qdt.second();
|
dt->second = qdt.second();
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & QSql::InOut],
|
qParamType[bindValueType(i) & QSql::InOut],
|
||||||
SQL_C_TIME,
|
SQL_C_TIME,
|
||||||
SQL_TIME,
|
SQL_TIME,
|
||||||
0,
|
0,
|
||||||
@ -1404,7 +1404,7 @@ bool QODBCResult::exec()
|
|||||||
|
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & QSql::InOut],
|
qParamType[bindValueType(i) & QSql::InOut],
|
||||||
SQL_C_TIMESTAMP,
|
SQL_C_TIMESTAMP,
|
||||||
SQL_TIMESTAMP,
|
SQL_TIMESTAMP,
|
||||||
d->driverPrivate->datetime_precision,
|
d->driverPrivate->datetime_precision,
|
||||||
@ -1417,7 +1417,7 @@ bool QODBCResult::exec()
|
|||||||
case QVariant::Int:
|
case QVariant::Int:
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & QSql::InOut],
|
qParamType[bindValueType(i) & QSql::InOut],
|
||||||
SQL_C_SLONG,
|
SQL_C_SLONG,
|
||||||
SQL_INTEGER,
|
SQL_INTEGER,
|
||||||
0,
|
0,
|
||||||
@ -1429,7 +1429,7 @@ bool QODBCResult::exec()
|
|||||||
case QVariant::UInt:
|
case QVariant::UInt:
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & QSql::InOut],
|
qParamType[bindValueType(i) & QSql::InOut],
|
||||||
SQL_C_ULONG,
|
SQL_C_ULONG,
|
||||||
SQL_NUMERIC,
|
SQL_NUMERIC,
|
||||||
15,
|
15,
|
||||||
@ -1441,7 +1441,7 @@ bool QODBCResult::exec()
|
|||||||
case QVariant::Double:
|
case QVariant::Double:
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & QSql::InOut],
|
qParamType[bindValueType(i) & QSql::InOut],
|
||||||
SQL_C_DOUBLE,
|
SQL_C_DOUBLE,
|
||||||
SQL_DOUBLE,
|
SQL_DOUBLE,
|
||||||
0,
|
0,
|
||||||
@ -1453,7 +1453,7 @@ bool QODBCResult::exec()
|
|||||||
case QVariant::LongLong:
|
case QVariant::LongLong:
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & QSql::InOut],
|
qParamType[bindValueType(i) & QSql::InOut],
|
||||||
SQL_C_SBIGINT,
|
SQL_C_SBIGINT,
|
||||||
SQL_BIGINT,
|
SQL_BIGINT,
|
||||||
0,
|
0,
|
||||||
@ -1465,7 +1465,7 @@ bool QODBCResult::exec()
|
|||||||
case QVariant::ULongLong:
|
case QVariant::ULongLong:
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & QSql::InOut],
|
qParamType[bindValueType(i) & QSql::InOut],
|
||||||
SQL_C_UBIGINT,
|
SQL_C_UBIGINT,
|
||||||
SQL_BIGINT,
|
SQL_BIGINT,
|
||||||
0,
|
0,
|
||||||
@ -1480,7 +1480,7 @@ bool QODBCResult::exec()
|
|||||||
}
|
}
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & QSql::InOut],
|
qParamType[bindValueType(i) & QSql::InOut],
|
||||||
SQL_C_BINARY,
|
SQL_C_BINARY,
|
||||||
SQL_LONGVARBINARY,
|
SQL_LONGVARBINARY,
|
||||||
val.toByteArray().size(),
|
val.toByteArray().size(),
|
||||||
@ -1492,7 +1492,7 @@ bool QODBCResult::exec()
|
|||||||
case QVariant::Bool:
|
case QVariant::Bool:
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & QSql::InOut],
|
qParamType[bindValueType(i) & QSql::InOut],
|
||||||
SQL_C_BIT,
|
SQL_C_BIT,
|
||||||
SQL_BIT,
|
SQL_BIT,
|
||||||
0,
|
0,
|
||||||
@ -1513,7 +1513,7 @@ bool QODBCResult::exec()
|
|||||||
QByteArray ba((const char *)a.constData(), a.size() * sizeof(SQLTCHAR));
|
QByteArray ba((const char *)a.constData(), a.size() * sizeof(SQLTCHAR));
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & QSql::InOut],
|
qParamType[bindValueType(i) & QSql::InOut],
|
||||||
SQL_C_TCHAR,
|
SQL_C_TCHAR,
|
||||||
strSize > 254 ? SQL_WLONGVARCHAR : SQL_WVARCHAR,
|
strSize > 254 ? SQL_WLONGVARCHAR : SQL_WVARCHAR,
|
||||||
0, // god knows... don't change this!
|
0, // god knows... don't change this!
|
||||||
@ -1527,7 +1527,7 @@ bool QODBCResult::exec()
|
|||||||
QByteArray strba((const char *)toSQLTCHAR(str).constData(), str.size()*sizeof(SQLTCHAR));
|
QByteArray strba((const char *)toSQLTCHAR(str).constData(), str.size()*sizeof(SQLTCHAR));
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & QSql::InOut],
|
qParamType[bindValueType(i) & QSql::InOut],
|
||||||
SQL_C_TCHAR,
|
SQL_C_TCHAR,
|
||||||
strSize > 254 ? SQL_WLONGVARCHAR : SQL_WVARCHAR,
|
strSize > 254 ? SQL_WLONGVARCHAR : SQL_WVARCHAR,
|
||||||
strSize,
|
strSize,
|
||||||
@ -1547,7 +1547,7 @@ bool QODBCResult::exec()
|
|||||||
|
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & QSql::InOut],
|
qParamType[bindValueType(i) & QSql::InOut],
|
||||||
SQL_C_CHAR,
|
SQL_C_CHAR,
|
||||||
strSize > 254 ? SQL_LONGVARCHAR : SQL_VARCHAR,
|
strSize > 254 ? SQL_LONGVARCHAR : SQL_VARCHAR,
|
||||||
strSize,
|
strSize,
|
||||||
@ -1565,7 +1565,7 @@ bool QODBCResult::exec()
|
|||||||
*ind = ba.size();
|
*ind = ba.size();
|
||||||
r = SQLBindParameter(d->hStmt,
|
r = SQLBindParameter(d->hStmt,
|
||||||
i + 1,
|
i + 1,
|
||||||
qParamType[(QFlag)(bindValueType(i)) & QSql::InOut],
|
qParamType[bindValueType(i) & QSql::InOut],
|
||||||
SQL_C_BINARY,
|
SQL_C_BINARY,
|
||||||
SQL_VARBINARY,
|
SQL_VARBINARY,
|
||||||
ba.length() + 1,
|
ba.length() + 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user