MCPcopy Create free account
hub / github.com/cutelyst/cutelyst / preparedQueryThread

Method preparedQueryThread

Cutelyst/Plugins/Utils/Sql/sql.cpp:249–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249QSqlQuery Sql::preparedQueryThread(const QString &query, const QString &dbName, bool forwardOnly)
250{
251 QSqlQuery sqlQuery(QSqlDatabase::database(databaseNameThread(dbName)));
252 sqlQuery.setForwardOnly(forwardOnly);
253 if (!sqlQuery.prepare(query)) {
254 qCCritical(C_SQL) << "Failed to prepare query:" << query
255 << sqlQuery.lastError().databaseText();
256 }
257 return sqlQuery;
258}
259
260QString Sql::databaseNameThread(const QString &dbName)
261{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected