File indexing completed on 2025-01-12 04:38:55
0001 //krazy:skip 0002 /**************************************************************************** 0003 ** 0004 ** Copyright (C) 2016 The Qt Company Ltd. 0005 ** Contact: https://www.qt.io/licensing/ 0006 ** 0007 ** This file is part of the QtSql module of the Qt Toolkit. 0008 ** 0009 ** $QT_BEGIN_LICENSE:LGPL$ 0010 ** Commercial License Usage 0011 ** Licensees holding valid commercial Qt licenses may use this file in 0012 ** accordance with the commercial license agreement provided with the 0013 ** Software or, alternatively, in accordance with the terms contained in 0014 ** a written agreement between you and The Qt Company. For licensing terms 0015 ** and conditions see https://www.qt.io/terms-conditions. For further 0016 ** information use the contact form at https://www.qt.io/contact-us. 0017 ** 0018 ** GNU Lesser General Public License Usage 0019 ** Alternatively, this file may be used under the terms of the GNU Lesser 0020 ** General Public License version 3 as published by the Free Software 0021 ** Foundation and appearing in the file LICENSE.LGPL3 included in the 0022 ** packaging of this file. Please review the following information to 0023 ** ensure the GNU Lesser General Public License version 3 requirements 0024 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. 0025 ** 0026 ** GNU General Public License Usage 0027 ** Alternatively, this file may be used under the terms of the GNU 0028 ** General Public License version 2.0 or (at your option) the GNU General 0029 ** Public license version 3 or any later version approved by the KDE Free 0030 ** Qt Foundation. The licenses are as published by the Free Software 0031 ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 0032 ** included in the packaging of this file. Please review the following 0033 ** information to ensure the GNU General Public License requirements will 0034 ** be met: https://www.gnu.org/licenses/gpl-2.0.html and 0035 ** https://www.gnu.org/licenses/gpl-3.0.html. 0036 ** 0037 ** $QT_END_LICENSE$ 0038 ** 0039 ****************************************************************************/ 0040 0041 #ifndef QSQL_SQLITE_H 0042 #define QSQL_SQLITE_H 0043 0044 // 0045 // W A R N I N G 0046 // ------------- 0047 // 0048 // This file is not part of the Qt API. It exists purely as an 0049 // implementation detail. This header file may change from version to 0050 // version without notice, or even be removed. 0051 // 0052 // We mean it. 0053 // 0054 0055 #include "skgsqlcipher_export.h" 0056 #include <QtSql/qsqldriver.h> 0057 0058 struct sqlite3; 0059 0060 QT_BEGIN_NAMESPACE 0061 0062 class QSqlResult; 0063 class QSQLiteDriverPrivate; 0064 0065 class SKGSQLCIPHER_EXPORT QSQLiteDriver : public QSqlDriver 0066 { 0067 Q_DECLARE_PRIVATE(QSQLiteDriver) 0068 Q_OBJECT 0069 friend class QSQLiteResultPrivate; 0070 public: 0071 explicit QSQLiteDriver(QObject* parent = nullptr); 0072 explicit QSQLiteDriver(sqlite3* connection, QObject* parent = nullptr); 0073 ~QSQLiteDriver() override; 0074 bool hasFeature(DriverFeature f) const Q_DECL_OVERRIDE; 0075 bool open(const QString& db, 0076 const QString& user, 0077 const QString& password, 0078 const QString& host, 0079 int port, 0080 const QString& conOpts) Q_DECL_OVERRIDE; 0081 void close() Q_DECL_OVERRIDE; 0082 QSqlResult* createResult() const Q_DECL_OVERRIDE; 0083 bool beginTransaction() Q_DECL_OVERRIDE; 0084 bool commitTransaction() Q_DECL_OVERRIDE; 0085 bool rollbackTransaction() Q_DECL_OVERRIDE; 0086 QStringList tables(QSql::TableType) const Q_DECL_OVERRIDE; 0087 0088 QSqlRecord record(const QString& tbl) const Q_DECL_OVERRIDE; 0089 QSqlIndex primaryIndex(const QString& tblname) const Q_DECL_OVERRIDE; 0090 QVariant handle() const Q_DECL_OVERRIDE; 0091 QString escapeIdentifier(const QString& identifier, IdentifierType) const Q_DECL_OVERRIDE; 0092 }; 0093 0094 QT_END_NAMESPACE 0095 0096 #endif // QSQL_SQLITE_H