Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include "qsql_odbc_p.h"
#include <qsqlrecord.h>
#include <qcoreapplication.h>
#include <qdatetime.h>
#include <qlist.h>
#include <qloggingcategory.h>
#include <qmath.h>
#include <qsqlerror.h>
#include <qsqlfield.h>
#include <qsqlindex.h>
#include <qstringconverter.h>
#include <qstringlist.h>
#include <qvariant.h>
#include <qvarlengtharray.h>
#include <QDebug>
#include <QSqlQuery>
#include <QtSql/private/qsqldriver_p.h>
#include <QtSql/private/qsqlresult_p.h>
#include "private/qtools_p.h"
#include "moc_qsql_odbc_p.cpp"
Go to the source code of this file.
Classes | |
class | SqlStmtHandle |
class | QODBCDriverPrivate |
class | QODBCResult |
class | QODBCResultPrivate |
struct | DiagRecord |
Macros | |
#define | SQL_SS_TIME2 (-154) |
#define | ODBC_CHECK_DRIVER |
Functions | |
template<typename C , int SIZE = sizeof(SQLTCHAR)> | |
static QString | fromSQLTCHAR (const C &input, qsizetype size=-1) |
template<int SIZE = sizeof(SQLTCHAR)> | |
QStringConverter::Encoding | encodingForSqlTChar () |
static QVarLengthArray< SQLTCHAR > | toSQLTCHAR (QStringView input) |
static QList< DiagRecord > | qWarnODBCHandle (int handleType, SQLHANDLE handle) |
static QList< DiagRecord > | qODBCWarn (const SQLHANDLE hStmt, const SQLHANDLE envHandle=nullptr, const SQLHANDLE pDbC=nullptr) |
static QList< DiagRecord > | qODBCWarn (const QODBCResultPrivate *odbc) |
static QList< DiagRecord > | qODBCWarn (const QODBCDriverPrivate *odbc) |
static DiagRecord | combineRecords (const QList< DiagRecord > &records) |
static QSqlError | errorFromDiagRecords (const QString &err, QSqlError::ErrorType type, const QList< DiagRecord > &records) |
static QString | errorStringFromDiagRecords (const QList< DiagRecord > &records) |
template<class T > | |
static void | qSqlWarning (const QString &message, T &&val) |
static QSqlError | qMakeError (const QString &err, QSqlError::ErrorType type, const QODBCResultPrivate *p) |
static QSqlError | qMakeError (const QString &err, QSqlError::ErrorType type, const QODBCDriverPrivate *p) |
static QMetaType | qDecodeODBCType (SQLSMALLINT sqltype, bool isSigned=true) |
template<typename CT > | |
static QVariant | getStringDataImpl (SQLHANDLE hStmt, SQLUSMALLINT column, qsizetype colSize, SQLSMALLINT targetType) |
static QVariant | qGetStringData (SQLHANDLE hStmt, SQLUSMALLINT column, int colSize, bool unicode) |
static QVariant | qGetBinaryData (SQLHANDLE hStmt, int column) |
static QVariant | qGetIntData (SQLHANDLE hStmt, int column, bool isSigned=true) |
static QVariant | qGetDoubleData (SQLHANDLE hStmt, int column) |
static QVariant | qGetBigIntData (SQLHANDLE hStmt, int column, bool isSigned=true) |
static bool | isAutoValue (const SQLHANDLE hStmt, int column) |
static QSqlField | qMakeFieldInfo (const SQLHANDLE hStmt, const QODBCDriverPrivate *p) |
static QSqlField | qMakeFieldInfo (const QODBCResultPrivate *p, int i) |
static size_t | qGetODBCVersion (const QString &connOpts) |
static SQLRETURN | qt_string_SQLSetConnectAttr (SQLHDBC handle, SQLINTEGER attr, QStringView val) |
Variables | |
static constexpr int | COLNAMESIZE = 256 |
static constexpr SQLSMALLINT | TABLENAMESIZE = 128 |
static constexpr SQLSMALLINT | qParamType [4] = { SQL_PARAM_INPUT, SQL_PARAM_INPUT, SQL_PARAM_OUTPUT, SQL_PARAM_INPUT_OUTPUT } |
#define ODBC_CHECK_DRIVER |
Definition at line 40 of file qsql_odbc.cpp.
#define SQL_SS_TIME2 (-154) |
Definition at line 36 of file qsql_odbc.cpp.
Referenced by qDecodeODBCType().
|
static |
Definition at line 293 of file qsql_odbc.cpp.
References add(), and DiagRecord::description.
Referenced by errorFromDiagRecords(), and errorStringFromDiagRecords().
QStringConverter::Encoding encodingForSqlTChar | ( | ) |
Definition at line 89 of file qsql_odbc.cpp.
References SIZE, QStringConverter::Utf16, QStringConverter::Utf32, and QStringConverter::Utf8.
Referenced by toSQLTCHAR().
|
static |
Definition at line 305 of file qsql_odbc.cpp.
References combineRecords().
Referenced by qMakeError(), and qMakeError().
|
static |
Definition at line 316 of file qsql_odbc.cpp.
References combineRecords().
Referenced by qSqlWarning().
|
inlinestatic |
Definition at line 71 of file qsql_odbc.cpp.
References QString::fromUcs4(), QString::fromUtf16(), QString::fromUtf8(), qMin(), and SIZE.
Referenced by QODBCDriverPrivate::checkDBMS(), QODBCDriverPrivate::checkHasMultiResults(), QODBCDriverPrivate::checkUnicode(), QODBCResult::exec(), qMakeFieldInfo(), and qWarnODBCHandle().
|
static |
Definition at line 411 of file qsql_odbc.cpp.
References qSqlWarning().
|
static |
Definition at line 591 of file qsql_odbc.cpp.
References arg, QString::number(), and qSqlWarning().
Referenced by qMakeFieldInfo().
|
static |
Definition at line 346 of file qsql_odbc.cpp.
References SQL_SS_TIME2, and QMetaType::UnknownType.
Referenced by qMakeFieldInfo(), and qMakeFieldInfo().
|
static |
Definition at line 570 of file qsql_odbc.cpp.
Referenced by QODBCResult::data().
|
static |
Definition at line 473 of file qsql_odbc.cpp.
References arg, COLNAMESIZE, QString::number(), qSqlWarning(), and read().
Referenced by QODBCResult::data().
|
static |
Definition at line 550 of file qsql_odbc.cpp.
Referenced by QODBCResult::data().
|
static |
Definition at line 530 of file qsql_odbc.cpp.
Referenced by QODBCResult::data(), and qMakeFieldInfo().
|
static |
Definition at line 688 of file qsql_odbc.cpp.
References Qt::CaseInsensitive.
Referenced by QODBCDriver::open().
|
static |
Definition at line 460 of file qsql_odbc.cpp.
Referenced by QODBCResult::data(), and qMakeFieldInfo().
|
static |
Definition at line 339 of file qsql_odbc.cpp.
References errorFromDiagRecords(), and qODBCWarn().
|
static |
Definition at line 332 of file qsql_odbc.cpp.
References errorFromDiagRecords(), and qODBCWarn().
Referenced by QODBCResult::exec(), QODBCResult::fetch(), QODBCResult::fetchFirst(), QODBCResult::fetchLast(), QODBCResult::fetchNext(), QODBCResult::fetchPrevious(), QODBCResult::nextResult(), QODBCResult::prepare(), and QODBCResult::reset().
|
static |
Definition at line 625 of file qsql_odbc.cpp.
References arg, COLNAMESIZE, fromSQLTCHAR(), i, isAutoValue(), QString::number(), qDecodeODBCType(), qSqlWarning(), and TABLENAMESIZE.
|
static |
Definition at line 606 of file qsql_odbc.cpp.
References QVariant::isNull(), qDecodeODBCType(), qGetIntData(), qGetStringData(), QVariant::toInt(), and var.
Referenced by QODBCResult::exec(), QODBCResult::nextResult(), and QODBCResult::reset().
|
static |
Definition at line 288 of file qsql_odbc.cpp.
References qODBCWarn().
|
static |
Definition at line 283 of file qsql_odbc.cpp.
References qODBCWarn().
|
static |
Definition at line 272 of file qsql_odbc.cpp.
References qWarnODBCHandle().
Referenced by qMakeError(), qMakeError(), qODBCWarn(), qODBCWarn(), and qSqlWarning().
Definition at line 323 of file qsql_odbc.cpp.
References errorStringFromDiagRecords(), qCWarning, and qODBCWarn().
Referenced by QODBCResult::~QODBCResult(), QODBCDriverPrivate::checkDriver(), QODBCDriverPrivate::checkHasSQLFetchScroll(), QODBCResult::data(), QODBCResult::exec(), getStringDataImpl(), isAutoValue(), QODBCResult::lastInsertId(), QODBCResult::nextResult(), QODBCResult::numRowsAffected(), QODBCResult::prepare(), qGetBinaryData(), qMakeFieldInfo(), QODBCResult::reset(), QODBCDriverPrivate::setConnectionOptions(), and QODBCDriverPrivate::splitTableQualifier().
|
static |
Definition at line 726 of file qsql_odbc.cpp.
References QByteArray::data(), encoded, QByteArray::size(), and toSQLTCHAR().
Referenced by QODBCDriverPrivate::setConnectionOptions().
|
static |
Definition at line 235 of file qsql_odbc.cpp.
References fromSQLTCHAR(), i, QString::number(), and state.
Referenced by qODBCWarn().
|
inlinestatic |
Definition at line 102 of file qsql_odbc.cpp.
References encodingForSqlTChar().
Referenced by QODBCDriverPrivate::checkUnicode(), QODBCResult::exec(), QODBCDriver::open(), QODBCResult::prepare(), QODBCDriver::primaryIndex(), qt_string_SQLSetConnectAttr(), QODBCDriver::record(), QODBCResult::reset(), and QODBCDriver::tables().
|
staticconstexpr |
Definition at line 42 of file qsql_odbc.cpp.
Referenced by qGetBinaryData(), and qMakeFieldInfo().
|
staticconstexpr |
Definition at line 45 of file qsql_odbc.cpp.
Referenced by QODBCResult::exec().
|
staticconstexpr |
Definition at line 43 of file qsql_odbc.cpp.
Referenced by qMakeFieldInfo().