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_db2_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// Qt-Security score:significant reason:default
4
5#ifndef QSQL_DB2_H
6#define QSQL_DB2_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 <QtCore/qglobal.h>
20
21#ifdef QT_PLUGIN
22#define Q_EXPORT_SQLDRIVER_DB2
23#else
24#define Q_EXPORT_SQLDRIVER_DB2 Q_SQL_EXPORT
25#endif
26
27#include <QtSql/qsqldriver.h>
28
30
32
33class Q_EXPORT_SQLDRIVER_DB2 QDB2Driver : public QSqlDriver
34{
35 Q_DECLARE_PRIVATE(QDB2Driver)
36 Q_OBJECT
37 friend class QDB2ResultPrivate;
38
39public:
40 explicit QDB2Driver(QObject *parent = nullptr);
41 QDB2Driver(Qt::HANDLE env, Qt::HANDLE con, QObject *parent = nullptr);
42 ~QDB2Driver();
43 bool hasFeature(DriverFeature) const override;
44 void close() override;
45 QSqlRecord record(const QString &tableName) const override;
46 QStringList tables(QSql::TableType type) const override;
47 QSqlResult *createResult() const override;
48 QSqlIndex primaryIndex(const QString &tablename) const override;
49 bool beginTransaction() override;
50 bool commitTransaction() override;
51 bool rollbackTransaction() override;
52 QString formatValue(const QSqlField &field, bool trimStrings) const override;
53 QVariant handle() const override;
54 bool open(const QString &db,
55 const QString &user,
56 const QString &password,
57 const QString &host,
58 int port,
59 const QString& connOpts) override;
60 QString escapeIdentifier(const QString &identifier, IdentifierType type) const override;
61
62private:
63 bool setAutoCommit(bool autoCommit);
64};
65
66QT_END_NAMESPACE
67
68#endif // QSQL_DB2_H
QSqlDriver * create(const QString &)
Creates and returns a QSqlDriver object for the driver called key.
Definition main.cpp:29
The QSqlDriverPlugin class provides an abstract base for custom QSqlDriver plugins.
#define Q_EXPORT_SQLDRIVER_DB2
Definition qsql_db2_p.h:24