|
| template<typename T> |
| static QT_BEGIN_NAMESPACE void | fbRelease (T *hh) |
| template<typename T> |
| static void | fbDispose (T *hh) |
| int | fbBaseType (int tt) |
| QString | fbErrorString (Firebird::IMaster *master, Firebird::IStatus *status) |
| QSqlError | fbError (Firebird::IMaster *master, Firebird::IStatus *status, QSqlError::ErrorType typetype) |
| QString | fbErrorLog (const QSqlError &err) |
| void | finishAndClear (Firebird::ThrowStatusWrapper &st, Firebird::ITransaction *&tr, TxnEnd endend) |
| Firebird::ITransaction * | startDefaultTransaction (Firebird::IAttachment *att, Firebird::ThrowStatusWrapper &st, TxnWait wait) |
| QMetaType::Type | blrTypeToQt (unsigned char blrType, bool hasScale) |
| void | encodeTextValue (char *datadata, int fbType, qsizetype lengthlength, const QByteArray &bytes) |
| QMetaType::Type | fbTypeToQt (int fbType, int scalescale) |
| bool | encodeInt128Slot (const QVariant &valval, int scalescale, char *slot, Firebird::IMaster *master, Firebird::IStatus *status, QString &errorText) |
| QVariant | decodeInt128Slot (const char *slot, int scalescale, QSql::NumericalPrecisionPolicy policy, Firebird::IMaster *master, Firebird::IStatus *status, QString *overflowText=nullptr) |
| template<typename Iface, typename Raw> |
| static QString | decFloatToString (Iface *iface, Firebird::ThrowStatusWrapper &st, const Raw *valuevalue) |
| template<typename Iface, typename Raw> |
| static void | decFloatFromString (Iface *iface, Firebird::ThrowStatusWrapper &st, const QByteArray &ss, Raw *out) |
| ISC_DATE | encodeQDate (Firebird::IUtil *util, const QDate &d) |
| ISC_TIME | encodeQTime (Firebird::IUtil *util, const QTime &tt) |
| ISC_TIMESTAMP | encodeQDateTime (Firebird::IUtil *util, const QDateTime &dt) |
| ISC_TIMESTAMP_TZ | encodeQDateTimeTz (Firebird::IStatus *iStatus, Firebird::IUtil *util, const QDateTime &dt) |
| ISC_TIME_TZ | encodeQTimeTz (Firebird::IStatus *iStatus, Firebird::IUtil *util, const QDateTime &dt) |
| QDate | decodeFirebirdDate (Firebird::IUtil *util, ISC_DATE date) |
| QTime | decodeFirebirdTime (Firebird::IUtil *util, ISC_TIME time) |
| QDateTime | decodeFirebirdTimestamp (Firebird::IUtil *util, const ISC_TIMESTAMP &ts) |
| QDateTime | decodeFirebirdTimestampTz (Firebird::IStatus *iStatus, Firebird::IUtil *util, const ISC_TIMESTAMP_TZ &tstz) |
| QDateTime | decodeFirebirdTimeTz (Firebird::IStatus *iStatus, Firebird::IUtil *util, const ISC_TIME_TZ &ttz) |
| bool encodeInt128Slot |
( |
const QVariant & | val, |
|
|
int | scale, |
|
|
char * | slot, |
|
|
Firebird::IMaster * | master, |
|
|
Firebird::IStatus * | status, |
|
|
QString & | errorText ) |
INT128 slot adapters
The two adapters own the single native/fallback switch for a 16-byte INT128 message slot (scale 0 for a plain INT128 parameter or array element), so the scalar paths and the array codec cannot diverge. With a 128-bit integer type (QSQL_HAS_INT128 from qsqlnumeric_p.h: qint128 on GCC/Clang, std::_Signed128 on MSVC via Qt's private qinternalint128 alias) the slot is packed and unpacked word-wise and converted with the QtPrivate::sql* helpers; without one, Firebird's IInt128 interface converts to and from the same canonical decimal string. Behaviour is identical either way.
Encoding reports a failure through errorText/false in both builds — never as FbException; callers wrap errorText with their own context. Decoding applies the numerical precision policy; when an integer part does not fit a LowPrecisionInt target it returns a double instead and, if overflowText is given, stores the value's decimal text there so the caller can warn at the rate it sees fit (QFirebirdResult::data() runs on every access of a cell).
RAII guard for Firebird OO-API handles
The Firebird OO API splits cleanup across two families: reference-counted interfaces freed with release() (IStatement, IResultSet, IBlob, …) and IDisposable ones freed with dispose() (IXpbBuilder, IBatchCompletionState). FbGuard centralises the "free on every error path" bookkeeping so it is not repeated at every call site.
FbGuard owns one handle and frees it on scope exit with the action supplied at construction, unless it has been dismissed. closeWith() performs the type-specific graceful shutdown (IResultSet::close, IStatement::free, ITransaction::commit, …) which itself consumes the interface reference on success — so on success the guard is dismissed (no extra free), and only on a failed close does the destructor release the handle. This mirrors exactly the "close on the happy path, release on the error path" idiom used throughout.
Definition at line 55 of file qsql_firebird_helpers_p.h.