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_ibase.cpp File Reference

(55f46569f3e9688c2a07973923bfda68aa2b0c3e)

#include "qsql_ibase_p.h"
#include <QtCore/qcoreapplication.h>
#include <QtCore/qendian.h>
#include <QtCore/qdatetime.h>
#include <QtCore/qtimezone.h>
#include <QtCore/qdeadlinetimer.h>
#include <QtCore/qdebug.h>
#include <QtCore/qlist.h>
#include <QtCore/private/qlocale_tools_p.h>
#include <QtCore/qloggingcategory.h>
#include <QtCore/qmap.h>
#include <QtCore/qmutex.h>
#include <QtCore/qvariant.h>
#include <QtCore/qvarlengtharray.h>
#include <QtSql/qsqlerror.h>
#include <QtSql/qsqlfield.h>
#include <QtSql/qsqlindex.h>
#include <QtSql/qsqlquery.h>
#include <QtSql/private/qsqlcachedresult_p.h>
#include <QtSql/private/qsqldriver_p.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
#include <mutex>
#include "moc_qsql_ibase_p.cpp"
Include dependency graph for qsql_ibase.cpp:

Go to the source code of this file.

Classes

struct  QIBaseEventBuffer
class  QIBaseDriverPrivate
class  QIBaseResult
class  QIBaseResultPrivate

Macros

#define FBVERSION   SQL_DIALECT_V6
#define SQLDA_CURRENT_VERSION   SQLDA_VERSION1
#define blr_boolean_dtype   blr_bool
#define SQL_BOOLEAN   32764

Typedefs

typedef QMap< void *, QIBaseDriver * > QIBaseBufferDriverMap

Functions

static bool getIBaseError (QString &msg, const ISC_STATUS *status, ISC_LONG &sqlcode)
static void createDA (XSQLDA *&sqlda)
static void enlargeDA (XSQLDA *&sqlda, int n)
static void initDA (XSQLDA *sqlda)
static void delDA (XSQLDA *&sqlda)
static QMetaType::Type qIBaseTypeName (int iType, bool hasScale)
static QMetaType::Type qIBaseTypeName2 (int iType, bool hasScale)
static ISC_TIMESTAMP toTimeStamp (const QDateTime &dt)
static QDateTime fromTimeStamp (const char *buffer)
static ISC_TIME toTime (QTime t)
static QTime fromTime (const char *buffer)
static ISC_DATE toDate (QDate t)
static QDate fromDate (const char *buffer)
 Q_GLOBAL_STATIC (QMutex, qMutex)
static void qFreeEventBuffer (QIBaseEventBuffer *eBuffer)
template<typename T>
static QList< QVarianttoList (const char **buf, int count)
static const char * readArrayBuffer (QList< QVariant > &list, const char *buffer, short curDim, const short *numElements, ISC_ARRAY_DESC *arrayDesc)
template<typename T>
static char * fillList (char *buffer, const QList< QVariant > &list, T *=nullptr)
template<>
char * fillList< float > (char *buffer, const QList< QVariant > &list, float *)
static char * qFillBufferWithString (char *buffer, const QString &string, short buflen, bool varying, bool array)
static char * createArrayBuffer (char *buffer, const QList< QVariant > &list, QMetaType::Type type, short curDim, ISC_ARRAY_DESC *arrayDesc, QString &error)
static ISC_EVENT_CALLBACK qEventCallback (char *result, ISC_USHORT length, const ISC_UCHAR *updated)
template<>
char * fillList< float > (char *buffer, const QList< QVariant > &list, float *)

Variables

constexpr qsizetype QIBaseChunkSize = SHRT_MAX / 2
static constexpr auto s_ibaseBaseDate = QDate::fromJulianDay(2400001)

Macro Definition Documentation

◆ blr_boolean_dtype

#define blr_boolean_dtype   blr_bool

Definition at line 44 of file qsql_ibase.cpp.

◆ FBVERSION

#define FBVERSION   SQL_DIALECT_V6

Definition at line 36 of file qsql_ibase.cpp.

◆ SQL_BOOLEAN

#define SQL_BOOLEAN   32764

Definition at line 53 of file qsql_ibase.cpp.

◆ SQLDA_CURRENT_VERSION

#define SQLDA_CURRENT_VERSION   SQLDA_VERSION1

Definition at line 39 of file qsql_ibase.cpp.

Typedef Documentation

◆ QIBaseBufferDriverMap

Definition at line 376 of file qsql_ibase.cpp.

Function Documentation

◆ createArrayBuffer()

char * createArrayBuffer ( char * buffer,
const QList< QVariant > & list,
QMetaType::Type type,
short curDim,
ISC_ARRAY_DESC * arrayDesc,
QString & error )
static

Definition at line 803 of file qsql_ibase.cpp.

◆ createDA()

void createDA ( XSQLDA *& sqlda)
static

Definition at line 82 of file qsql_ibase.cpp.

◆ delDA()

void delDA ( XSQLDA *& sqlda)
static

Definition at line 150 of file qsql_ibase.cpp.

◆ enlargeDA()

void enlargeDA ( XSQLDA *& sqlda,
int n )
static

Definition at line 93 of file qsql_ibase.cpp.

◆ fillList()

template<typename T>
char * fillList ( char * buffer,
const QList< QVariant > & list,
T * = nullptr )
static

Definition at line 757 of file qsql_ibase.cpp.

◆ fillList< float >() [1/2]

template<>
char * fillList< float > ( char * buffer,
const QList< QVariant > & list,
float *  )

Definition at line 768 of file qsql_ibase.cpp.

◆ fillList< float >() [2/2]

template<>
char * fillList< float > ( char * buffer,
const QList< QVariant > & list,
float *  )

Definition at line 768 of file qsql_ibase.cpp.

◆ fromDate()

QDate fromDate ( const char * buffer)
inlinestatic

Definition at line 309 of file qsql_ibase.cpp.

◆ fromTime()

QTime fromTime ( const char * buffer)
inlinestatic

Definition at line 296 of file qsql_ibase.cpp.

◆ fromTimeStamp()

QDateTime fromTimeStamp ( const char * buffer)
inlinestatic

Definition at line 250 of file qsql_ibase.cpp.

◆ getIBaseError()

bool getIBaseError ( QString & msg,
const ISC_STATUS * status,
ISC_LONG & sqlcode )
static

Definition at line 66 of file qsql_ibase.cpp.

◆ initDA()

void initDA ( XSQLDA * sqlda)
static

Definition at line 103 of file qsql_ibase.cpp.

◆ Q_GLOBAL_STATIC()

Q_GLOBAL_STATIC ( QMutex ,
qMutex  )

◆ qEventCallback()

ISC_EVENT_CALLBACK qEventCallback ( char * result,
ISC_USHORT length,
const ISC_UCHAR * updated )
static

Definition at line 1876 of file qsql_ibase.cpp.

◆ qFillBufferWithString()

char * qFillBufferWithString ( char * buffer,
const QString & string,
short buflen,
bool varying,
bool array )
static

Definition at line 779 of file qsql_ibase.cpp.

◆ qFreeEventBuffer()

void qFreeEventBuffer ( QIBaseEventBuffer * eBuffer)
static

Definition at line 380 of file qsql_ibase.cpp.

◆ qIBaseTypeName()

QMetaType::Type qIBaseTypeName ( int iType,
bool hasScale )
static

Definition at line 162 of file qsql_ibase.cpp.

◆ qIBaseTypeName2()

QMetaType::Type qIBaseTypeName2 ( int iType,
bool hasScale )
static

Definition at line 199 of file qsql_ibase.cpp.

◆ readArrayBuffer()

const char * readArrayBuffer ( QList< QVariant > & list,
const char * buffer,
short curDim,
const short * numElements,
ISC_ARRAY_DESC * arrayDesc )
static

Definition at line 623 of file qsql_ibase.cpp.

◆ toDate()

ISC_DATE toDate ( QDate t)
inlinestatic

Definition at line 304 of file qsql_ibase.cpp.

◆ toList()

template<typename T>
QList< QVariant > toList ( const char ** buf,
int count )
static

Definition at line 612 of file qsql_ibase.cpp.

◆ toTime()

ISC_TIME toTime ( QTime t)
inlinestatic

Definition at line 291 of file qsql_ibase.cpp.

◆ toTimeStamp()

ISC_TIMESTAMP toTimeStamp ( const QDateTime & dt)
inlinestatic

Definition at line 242 of file qsql_ibase.cpp.

Variable Documentation

◆ QIBaseChunkSize

qsizetype QIBaseChunkSize = SHRT_MAX / 2
constexpr

Definition at line 56 of file qsql_ibase.cpp.

◆ s_ibaseBaseDate

constexpr auto s_ibaseBaseDate = QDate::fromJulianDay(2400001)
staticconstexpr

Definition at line 240 of file qsql_ibase.cpp.