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

(508f587717ef550368a8ce7120c1ba8caeabce96)

#include "qsql_firebird_result_p.h"
#include "qsql_firebird_array_p.h"
#include "qsql_firebird_helpers_p.h"
#include <QtCore/qvarlengtharray.h>
#include <QtSql/qsqlfield.h>
#include <algorithm>
#include <cstring>
#include <limits>
Include dependency graph for qsql_firebird_result.cpp:

Go to the source code of this file.

Functions

static QList< ColumnInfobuildColumns (IMessageMetadata *meta, ThrowStatusWrapper &st)
static QByteArray readBlob (IAttachment *att, ITransaction *tra, IStatus *st, const ISC_QUAD &blobId)
static TxnOp classifyTxnControl (const QString &query)

Variables

static constexpr int kMaxRowSentinel = 0x7FFFFFFE

Function Documentation

◆ buildColumns()

QList< ColumnInfo > buildColumns ( IMessageMetadata * meta,
ThrowStatusWrapper & st )
static

◆ classifyTxnControl()

TxnOp classifyTxnControl ( const QString & query)
static

Classify a bare transaction-control statement (COMMIT/ROLLBACK [WORK]). These appear in SQL scripts but cannot be executed as DSQL against the driver's managed transaction (Firebird rejects it with "invalid transaction handle"); they are applied via the ITransaction API instead. COMMIT/ROLLBACK RETAIN are not treated specially.

Definition at line 246 of file qsql_firebird_result.cpp.

◆ readBlob()

QByteArray readBlob ( IAttachment * att,
ITransaction * tra,
IStatus * st,
const ISC_QUAD & blobId )
static

Read a BLOB into QByteArray. Uses ThrowStatusWrapper so a read error throws FbException (caught by QFirebirdResult::data) instead of being swallowed and returning a silently truncated buffer.

Definition at line 57 of file qsql_firebird_result.cpp.

Variable Documentation

◆ kMaxRowSentinel

constexpr int kMaxRowSentinel = 0x7FFFFFFE
staticconstexpr

Largest non-negative row-position sentinel. Two uses, same value:

  • passed to ensureCachedRow() to force the cache to pull every remaining row;
  • the at() position set after fetchLast() on a server-side scrollable cursor, which exposes no row count so the true last index is unknown (QSqlQuery only needs a valid non-negative position; the row data comes from outBuffer).

Definition at line 937 of file qsql_firebird_result.cpp.

Referenced by QFirebirdResult::fetchLast().