Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsql_db2.cpp File Reference

(55f46569f3e9688c2a07973923bfda68aa2b0c3e)

#include "qsql_db2_p.h"
#include <qcoreapplication.h>
#include <qdatetime.h>
#include <qlist.h>
#include <qsqlerror.h>
#include <qsqlfield.h>
#include <qsqlindex.h>
#include <qsqlrecord.h>
#include <qstringlist.h>
#include <qvarlengtharray.h>
#include <QDebug>
#include <QtSql/private/qsqldriver_p.h>
#include <QtSql/private/qsqlresult_p.h>
#include "private/qtools_p.h"
#include <sqlcli1.h>
#include <string.h>
#include "moc_qsql_db2_p.cpp"
Include dependency graph for qsql_db2.cpp:

Go to the source code of this file.

Classes

class  QDB2DriverPrivate
class  QDB2Result
class  QDB2ResultPrivate

Functions

static QString qFromTChar (SQLTCHAR *str)
static SQLTCHAR * qToTChar (const QString &str)
static QString qWarnDB2Handle (int handleType, SQLHANDLE handle, int *errorCode)
static QString qDB2Warn (const QDB2DriverPrivate *d, QStringList *errorCodes=nullptr)
static QString qDB2Warn (const QDB2ResultPrivate *d, QStringList *errorCodes=nullptr)
template<typename T>
static void qSqlWarning (const QString &message, const T *d)
template<typename T>
static QSqlError qMakeError (const QString &err, QSqlError::ErrorType type, const T *p)
static QMetaType qDecodeDB2Type (SQLSMALLINT sqltype)
static QSqlField qMakeFieldInfo (const QDB2ResultPrivate *d, int i)
static int qGetIntData (SQLHANDLE hStmt, int column, bool &isNull)
static double qGetDoubleData (SQLHANDLE hStmt, int column, bool &isNull)
static SQLBIGINT qGetBigIntData (SQLHANDLE hStmt, int column, bool &isNull)
static QString qGetStringData (SQLHANDLE hStmt, int column, int colSize, bool &isNull)
static QByteArray qGetBinaryData (SQLHANDLE hStmt, int column, SQLLEN &lengthIndicator, bool &isNull)
static QSqlField qMakeFieldInfo (const SQLHANDLE hStmt)
static bool qMakeStatement (QDB2ResultPrivate *d, bool forwardOnly, bool setForwardOnly=true)

Variables

static const int COLNAMESIZE = 255
static const SQLSMALLINT TABLENAMESIZE = 128
static const SQLSMALLINT qParamType [4] = { SQL_PARAM_INPUT, SQL_PARAM_INPUT, SQL_PARAM_OUTPUT, SQL_PARAM_INPUT_OUTPUT }

Function Documentation

◆ qDB2Warn() [1/2]

QString qDB2Warn ( const QDB2DriverPrivate * d,
QStringList * errorCodes = nullptr )
static

Definition at line 153 of file qsql_db2.cpp.

◆ qDB2Warn() [2/2]

QString qDB2Warn ( const QDB2ResultPrivate * d,
QStringList * errorCodes = nullptr )
static

Definition at line 169 of file qsql_db2.cpp.

◆ qDecodeDB2Type()

QMetaType qDecodeDB2Type ( SQLSMALLINT sqltype)
static

Definition at line 197 of file qsql_db2.cpp.

◆ qFromTChar()

QString qFromTChar ( SQLTCHAR * str)
static

Definition at line 118 of file qsql_db2.cpp.

◆ qGetBigIntData()

SQLBIGINT qGetBigIntData ( SQLHANDLE hStmt,
int column,
bool & isNull )
static

Definition at line 330 of file qsql_db2.cpp.

◆ qGetBinaryData()

QByteArray qGetBinaryData ( SQLHANDLE hStmt,
int column,
SQLLEN & lengthIndicator,
bool & isNull )
static

Definition at line 387 of file qsql_db2.cpp.

References COLNAMESIZE.

◆ qGetDoubleData()

double qGetDoubleData ( SQLHANDLE hStmt,
int column,
bool & isNull )
static

Definition at line 311 of file qsql_db2.cpp.

◆ qGetIntData()

int qGetIntData ( SQLHANDLE hStmt,
int column,
bool & isNull )
static

Definition at line 293 of file qsql_db2.cpp.

◆ qGetStringData()

QString qGetStringData ( SQLHANDLE hStmt,
int column,
int colSize,
bool & isNull )
static

Definition at line 347 of file qsql_db2.cpp.

◆ qMakeError()

template<typename T>
QSqlError qMakeError ( const QString & err,
QSqlError::ErrorType type,
const T * p )
static

Definition at line 189 of file qsql_db2.cpp.

◆ qMakeFieldInfo() [1/2]

QSqlField qMakeFieldInfo ( const QDB2ResultPrivate * d,
int i )
static

Definition at line 252 of file qsql_db2.cpp.

References COLNAMESIZE.

◆ qMakeFieldInfo() [2/2]

QSqlField qMakeFieldInfo ( const SQLHANDLE hStmt)
static

Definition at line 469 of file qsql_db2.cpp.

◆ qMakeStatement()

bool qMakeStatement ( QDB2ResultPrivate * d,
bool forwardOnly,
bool setForwardOnly = true )
static

Definition at line 486 of file qsql_db2.cpp.

◆ qSqlWarning()

template<typename T>
void qSqlWarning ( const QString & message,
const T * d )
static

Definition at line 182 of file qsql_db2.cpp.

◆ qToTChar()

SQLTCHAR * qToTChar ( const QString & str)
static

Definition at line 125 of file qsql_db2.cpp.

◆ qWarnDB2Handle()

QString qWarnDB2Handle ( int handleType,
SQLHANDLE handle,
int * errorCode )
static

Definition at line 130 of file qsql_db2.cpp.

Variable Documentation

◆ COLNAMESIZE

const int COLNAMESIZE = 255
static

Definition at line 36 of file qsql_db2.cpp.

Referenced by qGetBinaryData(), and qMakeFieldInfo().

◆ qParamType

const SQLSMALLINT qParamType = { SQL_PARAM_INPUT, SQL_PARAM_INPUT, SQL_PARAM_OUTPUT, SQL_PARAM_INPUT_OUTPUT }
static

Definition at line 41 of file qsql_db2.cpp.

◆ TABLENAMESIZE

const SQLSMALLINT TABLENAMESIZE = 128
static

Definition at line 40 of file qsql_db2.cpp.