File indexing completed on 2025-01-05 04:46:58
0001 /* 0002 SPDX-FileCopyrightText: 2012 Volker Krause <vkrause@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <QSqlDatabase> 0010 0011 namespace Akonadi 0012 { 0013 namespace Server 0014 { 0015 /** Helper methods for checking the database system we are dealing with. */ 0016 namespace DbType 0017 { 0018 /** Supported database types. */ 0019 enum Type { 0020 Unknown, 0021 Sqlite, 0022 MySQL, 0023 PostgreSQL, 0024 }; 0025 0026 /** Returns the type of the given database object. */ 0027 Type type(const QSqlDatabase &db); 0028 0029 /** Returns the type for the given driver name. */ 0030 Type typeForDriverName(const QString &driverName); 0031 0032 } // namespace DbType 0033 } // namespace Server 0034 } // namespace Akonadi