KDb
MysqlConnection.cpp
60 QueryRecordOptions(QueryRecordOption::Default) & ~QueryRecordOptions(QueryRecordOption::AddLimitTo1));
78 QueryRecordOptions(QueryRecordOption::Default) & ~QueryRecordOptions(QueryRecordOption::AddLimitTo1));
147 return drv_executeSql(KDbEscapedString("CREATE DATABASE %1").arg(escapeIdentifier(storedDbName)));
150bool MysqlConnection::drv_useDatabase(const QString &dbName, bool *cancelled, KDbMessageHandler* msgHandler)
173 return drv_executeSql(KDbEscapedString("DROP DATABASE %1").arg(escapeIdentifier(storedDbName)));
Database specific connection data, e.g. host, port.
Definition KDbConnectionData.shared.h:36
Generic options for a single connection. The options are accessible using key/value pairs....
Definition KDbConnectionOptions.h:36
Provides database connection, allowing queries and data modification.
Definition KDbConnection.h:52
virtual KDbEscapedString escapeString(const QString &str) const
Definition KDbConnection.cpp:3535
tristate querySingleString(const KDbEscapedString &sql, QString *value, int column=0, QueryRecordOptions options=QueryRecordOption::Default)
Definition KDbConnection.cpp:2439
virtual QString escapeIdentifier(const QString &id) const
Identifier escaping function in the associated KDbDriver.
Definition KDbConnection.cpp:3044
tristate querySingleNumber(const KDbEscapedString &sql, int *number, int column=0, QueryRecordOptions options=QueryRecordOption::Default)
Definition KDbConnection.cpp:2477
tristate resultExists(const KDbEscapedString &sql, QueryRecordOptions options=QueryRecordOption::Default)
Definition KDbConnection.cpp:2556
@ AddLimitTo1
Adds a "LIMIT 1" clause to the query for optimization purposes (it should not include one already)
Definition KDbMessageHandler.h:135
Prepared statement interface for backend-dependent implementations.
Definition KDbPreparedStatementInterface.h:32
KDbQuerySchema provides information about database query.
Definition KDbQuerySchema.h:46
Definition KDbResult.shared.h:35
The KDbSqlResult class abstracts result of a raw SQL query preparation by KDbConnection::prepareSql()
Definition KDbSqlResult.h:45
bool drv_executeSql(const KDbEscapedString &sql) override
Executes query for a raw SQL statement sql without returning resulting records.
Definition MysqlConnection.cpp:186
KDbSqlResult * drv_prepareSql(const KDbEscapedString &sql) override
Prepares query for a raw SQL statement sql with possibility of returning records.
Definition MysqlConnection.cpp:176
bool drv_closeDatabase() override
Definition MysqlConnection.cpp:163
bool drv_useDatabase(const QString &dbName=QString(), bool *cancelled=nullptr, KDbMessageHandler *msgHandler=nullptr) override
Definition MysqlConnection.cpp:150
QString serverResultName() const override
Implemented for KDbResultable.
Definition MysqlConnection.cpp:195
bool drv_dropDatabase(const QString &dbName=QString()) override
Definition MysqlConnection.cpp:169
bool drv_createDatabase(const QString &dbName=QString()) override
Definition MysqlConnection.cpp:141
KDbCursor * prepareQuery(const KDbEscapedString &sql, KDbCursor::Options options=KDbCursor::Option::None) override
Definition MysqlConnection.cpp:98
tristate drv_containsTable(const QString &tableName) override
Definition MysqlConnection.cpp:200
bool drv_getServerVersion(KDbServerVersionInfo *version) override
Definition MysqlConnection.cpp:67
bool drv_getDatabasesList(QStringList *list) override
Definition MysqlConnection.cpp:108
MysqlConnection(KDbDriver *driver, const KDbConnectionData &connData, const KDbConnectionOptions &options)
Definition MysqlConnection.cpp:32
bool drv_databaseExists(const QString &dbName, bool ignoreErrors=true) override
reimplemented using "SHOW DATABASES LIKE..." because MySQL stores db names in lower case.
Definition MysqlConnection.cpp:125
KDbPreparedStatementInterface * prepareStatementInternal() override
Definition MysqlConnection.cpp:206
3-state logical type with three values: true, false and cancelled and convenient operators.
Definition KDbTristate.h:101
void clear()
QRegularExpressionMatch match(QStringView subjectView, qsizetype offset, MatchType matchType, MatchOptions matchOptions) const const
QString fromUtf8(QByteArrayView str)
QString toLower() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:47:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:47:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.