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_p.h
Go to the documentation of this file.
1// Copyright (C) 2026 The Qt Company Ltd.
2// Copyright (C) 2026 Andreas Bacher
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4// Qt-Security score:significant reason:default
5#ifndef QSQL_FIREBIRD_P_H
6#define QSQL_FIREBIRD_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtSql/qsqldriver.h>
20#include <QtSql/qsqlquery.h>
21
23
24class QFirebirdDriver;
27class QFirebirdResult;
28
30{
31 Q_OBJECT
32 Q_DECLARE_PRIVATE(QFirebirdDriver)
33 friend class QFirebirdResult;
35
36public:
37 explicit QFirebirdDriver(QObject *parent = nullptr);
39
40 bool hasFeature(DriverFeature feature) const override;
41
42 bool open(const QString &db,
43 const QString &user,
44 const QString &password,
45 const QString &host,
46 int port,
47 const QString &connOpts) override;
48 void close() override;
49
50 QSqlResult *createResult() const override;
51
55
56 QStringList tables(QSql::TableType type) const override;
57 QSqlRecord record(const QString &tableName) const override;
58 QSqlIndex primaryIndex(const QString &tableName) const override;
59
60 QString escapeIdentifier(const QString &identifier, IdentifierType type) const override;
61 QString formatValue(const QSqlField &field, bool trimStrings) const override;
62
63 QVariant handle() const override;
64 int maximumIdentifierLength(IdentifierType type) const override;
65
66 bool subscribeToNotification(const QString &name) override;
67 bool unsubscribeFromNotification(const QString &name) override;
69
70 bool cancelQuery() override;
71
72private Q_SLOTS:
74
75private:
76 // Prepare, bind and execute a schema-introspection query.
77 QSqlQuery execMetadataQuery(const QString &sql,
78 const QVariantList &binds = {}) const;
79};
80
81QT_END_NAMESPACE
82
83#endif // QSQL_FIREBIRD_P_H
bool commitTransaction() override
This function is called to commit a transaction.
QSqlResult * createResult() const override
Creates an empty SQL result on the database.
bool cancelQuery() override
bool hasFeature(DriverFeature feature) const override
Returns true if the driver supports feature feature; otherwise returns false.
QString escapeIdentifier(const QString &identifier, IdentifierType type) const override
Returns the identifier escaped according to the database rules.
QStringList tables(QSql::TableType type) const override
Returns a list of the names of the tables in the database.
QSqlRecord record(const QString &tableName) const override
Returns a QSqlRecord populated with the names of the fields in table tableName.
QFirebirdDriver(QObject *parent=nullptr)
bool rollbackTransaction() override
This function is called to rollback a transaction.
QSqlIndex primaryIndex(const QString &tableName) const override
Returns the primary index for table tableName.
int maximumIdentifierLength(IdentifierType type) const override
QVariant handle() const override
Returns the low-level database handle wrapped in a QVariant or an invalid variant if there is no hand...
bool open(const QString &db, const QString &user, const QString &password, const QString &host, int port, const QString &connOpts) override
Derived classes must reimplement this pure virtual function to open a database connection on database...
QStringList subscribedToNotifications() const override
Returns a list of the names of the event notifications that are currently subscribed to.
bool unsubscribeFromNotification(const QString &name) override
This function is called to unsubscribe from event notifications from the database.
QString formatValue(const QSqlField &field, bool trimStrings) const override
Returns a string representation of the field value for the database.
bool beginTransaction() override
This function is called to begin a transaction.
bool subscribeToNotification(const QString &name) override
This function is called to subscribe to event notifications from the database.
~QFirebirdDriver() override
void close() override
Derived classes must reimplement this pure virtual function in order to close the database connection...
Combined button and popup list for selecting options.