Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qsql_ibase_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QSQL_IBASE_H
5#define QSQL_IBASE_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtSql/qsqldriver.h>
19#include <ibase.h>
20
21#ifdef QT_PLUGIN
22#define Q_EXPORT_SQLDRIVER_IBASE
23#else
24#define Q_EXPORT_SQLDRIVER_IBASE Q_SQL_EXPORT
25#endif
26
27static_assert(FB_API_VER >= 20, "Qt requires at least the Firebird 2.0 client APIs.");
28
30
31class QSqlResult;
33
35{
36 friend class QIBaseResultPrivate;
37 Q_DECLARE_PRIVATE(QIBaseDriver)
39public:
40 explicit QIBaseDriver(QObject *parent = nullptr);
41 explicit QIBaseDriver(isc_db_handle connection, QObject *parent = nullptr);
42 virtual ~QIBaseDriver();
43 bool hasFeature(DriverFeature f) const override;
44 bool open(const QString &db,
45 const QString &user,
46 const QString &password,
47 const QString &host,
48 int port,
49 const QString &connOpts) override;
50 bool open(const QString &db,
51 const QString &user,
52 const QString &password,
53 const QString &host,
54 int port) { return open(db, user, password, host, port, QString()); }
55 void close() override;
56 QSqlResult *createResult() const override;
57 bool beginTransaction() override;
58 bool commitTransaction() override;
59 bool rollbackTransaction() override;
60 QStringList tables(QSql::TableType) const override;
61
62 QSqlRecord record(const QString& tablename) const override;
63 QSqlIndex primaryIndex(const QString &table) const override;
64
65 QString formatValue(const QSqlField &field, bool trimStrings) const override;
66 QVariant handle() const override;
67
68 QString escapeIdentifier(const QString &identifier, IdentifierType type) const override;
69
70 bool subscribeToNotification(const QString &name) override;
71 bool unsubscribeFromNotification(const QString &name) override;
73 int maximumIdentifierLength(IdentifierType type) const override;
74private Q_SLOTS:
75 void qHandleEventNotification(void* updatedResultBuffer);
76};
77
79
80#endif // QSQL_IBASE_H
bool open(const QString &db, const QString &user, const QString &password, const QString &host, int port)
\inmodule QtCore
Definition qobject.h:103
The QSqlDriver class is an abstract base class for accessing specific SQL databases.
Definition qsqldriver.h:26
virtual QString formatValue(const QSqlField &field, bool trimStrings=false) const
Returns a string representation of the field value for the database.
virtual bool commitTransaction()
This function is called to commit a transaction.
virtual QSqlResult * createResult() const =0
Creates an empty SQL result on the database.
virtual bool unsubscribeFromNotification(const QString &name)
This function is called to unsubscribe from event notifications from the database.
virtual QSqlIndex primaryIndex(const QString &tableName) const
Returns the primary index for table tableName.
virtual bool beginTransaction()
This function is called to begin a transaction.
virtual QSqlRecord record(const QString &tableName) const
Returns a QSqlRecord populated with the names of the fields in table tableName.
DriverFeature
This enum contains a list of features a driver might support.
Definition qsqldriver.h:33
virtual bool rollbackTransaction()
This function is called to rollback a transaction.
virtual void close()=0
Derived classes must reimplement this pure virtual function in order to close the database connection...
virtual QString escapeIdentifier(const QString &identifier, IdentifierType type) const
Returns the identifier escaped according to the database rules.
virtual QVariant handle() const
Returns the low-level database handle wrapped in a QVariant or an invalid variant if there is no hand...
virtual bool open(const QString &db, const QString &user=QString(), const QString &password=QString(), const QString &host=QString(), int port=-1, const QString &connOpts=QString())=0
Derived classes must reimplement this pure virtual function to open a database connection on database...
virtual int maximumIdentifierLength(IdentifierType type) const
virtual bool hasFeature(DriverFeature f) const =0
Returns true if the driver supports feature feature; otherwise returns false.
virtual bool subscribeToNotification(const QString &name)
This function is called to subscribe to event notifications from the database.
virtual QStringList tables(QSql::TableType tableType) const
Returns a list of the names of the tables in the database.
virtual QStringList subscribedToNotifications() const
Returns a list of the names of the event notifications that are currently subscribed to.
The QSqlField class manipulates the fields in SQL database tables and views.
Definition qsqlfield.h:19
The QSqlIndex class provides functions to manipulate and describe database indexes.
Definition qsqlindex.h:18
The QSqlRecord class encapsulates a database record.
Definition qsqlrecord.h:20
The QSqlResult class provides an abstract interface for accessing data from specific SQL databases.
Definition qsqlresult.h:22
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qvariant.h:65
Combined button and popup list for selecting options.
DBusConnection * connection
EGLOutputPortEXT port
GLfloat GLfloat f
GLenum type
GLuint name
GLenum GLenum GLsizei void * table
#define Q_EXPORT_SQLDRIVER_IBASE
#define Q_OBJECT
#define Q_SLOTS
QMimeDatabase db
[0]