MauiKit Accounts
accountsdb.cpp
10const static QUrl DBDir = QUrl::fromLocalFile(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/maui/");
62 log.append(file.fileName() + QStringLiteral("' for database and tables creation query cannot be not found!"));
68 qDebug() << QStringLiteral("Fatal error on try to create database! The file with sql queries for database creation cannot be opened!");
107bool AccountsDB::checkExistance(const QString &tableName, const QString &searchId, const QString &search)
109 auto queryStr = QString("SELECT %1 FROM %2 WHERE %3 = \"%4\"").arg(searchId, tableName, searchId, search);
158 QString sqlQueryString = "INSERT INTO " + tableName + " (" + QString(fields.join(",")) + ") VALUES(" + QString(strValues.join(",")) + ")";
169bool AccountsDB::update(const QString &tableName, const FMH::MODEL &updateData, const QVariantMap &where)
189 QString sqlQueryString = "UPDATE " + tableName + " SET " + QString(set.join(",")) + " WHERE " + QString(condition.join(","));
195bool AccountsDB::update(const QString &table, const QString &column, const QVariant &newValue, const QVariant &op, const QString &id)
197 auto queryStr = QString("UPDATE %1 SET %2 = \"%3\" WHERE %4 = \"%5\"").arg(table, column, newValue.toString().replace("\"", "\"\""), op.toString(), id);
char * toString(const EngineQuery &query)
bool fileExists(const QUrl &path)
static const QHash< MODEL_KEY, QString > MODEL_NAME
KSERVICE_EXPORT KService::List query(FilterFunc filterFunc)
QString name(GameStandardAction id)
QByteArray trimmed() const const
bool isEmpty() const const
QList< Key > keys() const const
ReadOnly
void append(QList< T > &&value)
const_reference at(qsizetype i) const const
void clear()
qsizetype size() const const
QSqlDatabase addDatabase(QSqlDriver *driver, const QString &connectionName)
void close()
QString connectionName() const const
bool contains(const QString &connectionName)
bool isOpen() const const
QSqlError lastError() const const
bool open()
void setDatabaseName(const QString &name)
QString text() const const
bool exec()
GenericDataLocation
QString writableLocation(StandardLocation type)
QString & append(QChar ch)
QString arg(Args &&... args) const const
bool endsWith(QChar c, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
QString join(QChar separator) const const
QUrl fromLocalFile(const QString &localFile)
QString toLocalFile() const const
QString toString(FormattingOptions options) const const
QUuid createUuid()
QString toString(StringFormat mode) const const
QString toString() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:39:19 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:39:19 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.