File indexing completed on 2025-01-19 03:53:33
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2009-09-27 0007 * Description : Database engine SQL query 0008 * 0009 * SPDX-FileCopyrightText: 2009-2010 by Holger Foerster <Hamsi2k at freenet dot de> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #ifndef DIGIKAM_DB_ENGINE_SQL_QUERY_H 0016 #define DIGIKAM_DB_ENGINE_SQL_QUERY_H 0017 0018 // Qt includes 0019 0020 #include <QMetaType> 0021 #include <QString> 0022 #include <QSqlQuery> 0023 0024 // Local includes 0025 0026 #include "digikam_export.h" 0027 0028 namespace Digikam 0029 { 0030 0031 class DIGIKAM_EXPORT DbEngineSqlQuery : public QSqlQuery 0032 { 0033 0034 public: 0035 0036 explicit DbEngineSqlQuery(const QSqlQuery& other); 0037 explicit DbEngineSqlQuery(const QSqlDatabase& db); 0038 ~DbEngineSqlQuery() = default; 0039 0040 DbEngineSqlQuery& operator=(const DbEngineSqlQuery& other); 0041 0042 bool prepare(const QString& query); 0043 QString lastQuery() const; 0044 0045 private: 0046 0047 QString m_query; 0048 }; 0049 0050 } // namespace Digikam 0051 0052 #endif // DIGIKAM_DB_ENGINE_SQL_QUERY_H