Akonadi

dbtype.cpp
1/*
2 SPDX-FileCopyrightText: 2012 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "dbtype.h"
8
9using namespace Akonadi::Server;
10
15
17{
18 if (driverName.startsWith(QLatin1StringView("QMYSQL"))) {
19 return MySQL;
20 }
21 if (driverName == QLatin1StringView("QPSQL")) {
22 return PostgreSQL;
23 }
24 if (driverName == QLatin1StringView("QSQLITE") || driverName == QLatin1StringView("QSQLITE3")) {
25 return Sqlite;
26 }
27 return Unknown;
28}
Type
Supported database types.
Definition dbtype.h:19
Type type(const QSqlDatabase &db)
Returns the type of the given database object.
Definition dbtype.cpp:11
Type typeForDriverName(const QString &driverName)
Returns the type for the given driver name.
Definition dbtype.cpp:16
QString driverName() const const
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.