mirror of
https://github.com/silverqx/TinyORM.git
synced 2026-01-06 10:59:31 -06:00
used move semantics for bindings
It save one copy 🫤
This commit is contained in:
@@ -104,41 +104,35 @@ namespace Orm
|
||||
/* Running SQL Queries */
|
||||
/*! Run a select statement against the database. */
|
||||
SqlQuery
|
||||
select(const QString &queryString,
|
||||
const QVector<QVariant> &bindings = {});
|
||||
select(const QString &queryString, QVector<QVariant> bindings = {});
|
||||
/*! Run a select statement against the database. */
|
||||
inline SqlQuery
|
||||
selectFromWriteConnection(const QString &queryString,
|
||||
const QVector<QVariant> &bindings = {});
|
||||
QVector<QVariant> bindings = {});
|
||||
|
||||
/*! Run a select statement and return a single result. */
|
||||
SqlQuery
|
||||
selectOne(const QString &queryString, const QVector<QVariant> &bindings = {});
|
||||
selectOne(const QString &queryString, QVector<QVariant> bindings = {});
|
||||
/*! Run a select statement and return the first column of the first row. */
|
||||
QVariant
|
||||
scalar(const QString &queryString, const QVector<QVariant> &bindings = {});
|
||||
scalar(const QString &queryString, QVector<QVariant> bindings = {});
|
||||
|
||||
/*! Run an insert statement against the database. */
|
||||
inline SqlQuery
|
||||
insert(const QString &queryString,
|
||||
const QVector<QVariant> &bindings = {});
|
||||
insert(const QString &queryString, QVector<QVariant> bindings = {});
|
||||
/*! Run an update statement against the database. */
|
||||
inline std::tuple<int, QSqlQuery>
|
||||
update(const QString &queryString,
|
||||
const QVector<QVariant> &bindings = {});
|
||||
update(const QString &queryString, QVector<QVariant> bindings = {});
|
||||
/*! Run a delete statement against the database. */
|
||||
inline std::tuple<int, QSqlQuery>
|
||||
remove(const QString &queryString,
|
||||
const QVector<QVariant> &bindings = {});
|
||||
remove(const QString &queryString, QVector<QVariant> bindings = {});
|
||||
|
||||
/*! Execute an SQL statement, should be used for DDL/DML queries, internally
|
||||
calls DatabaseConnection::recordsHaveBeenModified(). */
|
||||
SqlQuery statement(const QString &queryString,
|
||||
const QVector<QVariant> &bindings = {});
|
||||
SqlQuery statement(const QString &queryString, QVector<QVariant> bindings = {});
|
||||
/*! Run an SQL statement and get the number of rows affected (for DML queries). */
|
||||
std::tuple<int, QSqlQuery>
|
||||
affectingStatement(const QString &queryString,
|
||||
const QVector<QVariant> &bindings = {});
|
||||
affectingStatement(const QString &queryString, QVector<QVariant> bindings = {});
|
||||
|
||||
/*! Run a raw, unprepared query against the database (good for DDL queries). */
|
||||
SqlQuery unprepared(const QString &queryString);
|
||||
@@ -159,7 +153,7 @@ namespace Orm
|
||||
QSqlQuery getQtQuery();
|
||||
|
||||
/*! Prepare the query bindings for execution. */
|
||||
QVector<QVariant> prepareBindings(QVector<QVariant> bindings) const;
|
||||
QVector<QVariant> &prepareBindings(QVector<QVariant> &bindings) const;
|
||||
/*! Bind values to their parameters in the given statement. */
|
||||
static void bindValues(QSqlQuery &query, const QVector<QVariant> &bindings);
|
||||
|
||||
@@ -275,7 +269,7 @@ namespace Orm
|
||||
/*! Run a SQL statement and log its execution context. */
|
||||
template<typename Return>
|
||||
Return run(
|
||||
const QString &queryString, const QVector<QVariant> &bindings,
|
||||
const QString &queryString, QVector<QVariant> &&bindings,
|
||||
const QString &type, const RunCallback<Return> &callback);
|
||||
/*! Run a SQL statement. */
|
||||
template<typename Return>
|
||||
@@ -388,32 +382,29 @@ namespace Orm
|
||||
|
||||
SqlQuery
|
||||
DatabaseConnection::selectFromWriteConnection(const QString &queryString,
|
||||
const QVector<QVariant> &bindings)
|
||||
QVector<QVariant> bindings)
|
||||
{
|
||||
// This member function is used from the schema builders/post-processors only
|
||||
// FEATURE read/write connection silverqx
|
||||
return select(queryString, bindings/*, false*/);
|
||||
return select(queryString, std::move(bindings)/*, false*/);
|
||||
}
|
||||
|
||||
SqlQuery
|
||||
DatabaseConnection::insert(const QString &queryString,
|
||||
const QVector<QVariant> &bindings)
|
||||
DatabaseConnection::insert(const QString &queryString, QVector<QVariant> bindings)
|
||||
{
|
||||
return statement(queryString, bindings);
|
||||
return statement(queryString, std::move(bindings));
|
||||
}
|
||||
|
||||
std::tuple<int, QSqlQuery>
|
||||
DatabaseConnection::update(const QString &queryString,
|
||||
const QVector<QVariant> &bindings)
|
||||
DatabaseConnection::update(const QString &queryString, QVector<QVariant> bindings)
|
||||
{
|
||||
return affectingStatement(queryString, bindings);
|
||||
return affectingStatement(queryString, std::move(bindings));
|
||||
}
|
||||
|
||||
std::tuple<int, QSqlQuery>
|
||||
DatabaseConnection::remove(const QString &queryString,
|
||||
const QVector<QVariant> &bindings)
|
||||
DatabaseConnection::remove(const QString &queryString, QVector<QVariant> bindings)
|
||||
{
|
||||
return affectingStatement(queryString, bindings);
|
||||
return affectingStatement(queryString, std::move(bindings));
|
||||
}
|
||||
|
||||
/* Obtain connection instance */
|
||||
@@ -522,7 +513,7 @@ namespace Orm
|
||||
template<typename Return>
|
||||
Return
|
||||
DatabaseConnection::run(
|
||||
const QString &queryString, const QVector<QVariant> &bindings,
|
||||
const QString &queryString, QVector<QVariant> &&bindings,
|
||||
const QString &type, const RunCallback<Return> &callback)
|
||||
{
|
||||
reconnectIfMissingConnection();
|
||||
@@ -537,8 +528,9 @@ namespace Orm
|
||||
Return result;
|
||||
|
||||
/* Prepare bindings early so they will be prepared only once (for performance
|
||||
reasons). */
|
||||
const auto preparedBindings = prepareBindings(bindings);
|
||||
reasons). The weird preparedBindings return value is for better variable
|
||||
naming. */
|
||||
const auto &preparedBindings = prepareBindings(bindings);
|
||||
|
||||
/* Here we will run this query. If an exception occurs we'll determine if it was
|
||||
caused by a connection that has been lost. If that is the cause, we'll try
|
||||
|
||||
@@ -73,43 +73,42 @@ namespace Query
|
||||
// TODO next add support for named bindings, Using Named Bindings silverqx
|
||||
/*! Run a select statement against the database. */
|
||||
SqlQuery
|
||||
select(const QString &query, const QVector<QVariant> &bindings = {},
|
||||
select(const QString &query, QVector<QVariant> bindings = {},
|
||||
const QString &connection = "");
|
||||
/*! Run a select statement against the database. */
|
||||
SqlQuery
|
||||
selectFromWriteConnection(
|
||||
const QString &query, const QVector<QVariant> &bindings = {},
|
||||
const QString &connection = "");
|
||||
selectFromWriteConnection(const QString &query, QVector<QVariant> bindings = {},
|
||||
const QString &connection = "");
|
||||
|
||||
/*! Run a select statement and return a single result. */
|
||||
SqlQuery
|
||||
selectOne(const QString &query, const QVector<QVariant> &bindings = {},
|
||||
selectOne(const QString &query, QVector<QVariant> bindings = {},
|
||||
const QString &connection = "");
|
||||
/*! Run a select statement and return the first column of the first row. */
|
||||
QVariant
|
||||
scalar(const QString &query, const QVector<QVariant> &bindings = {},
|
||||
scalar(const QString &query, QVector<QVariant> bindings = {},
|
||||
const QString &connection = "");
|
||||
|
||||
/*! Run an insert statement against the database. */
|
||||
SqlQuery
|
||||
insert(const QString &query, const QVector<QVariant> &bindings = {},
|
||||
insert(const QString &query, QVector<QVariant> bindings = {},
|
||||
const QString &connection = "");
|
||||
/*! Run an update statement against the database. */
|
||||
std::tuple<int, QSqlQuery>
|
||||
update(const QString &query, const QVector<QVariant> &bindings = {},
|
||||
update(const QString &query, QVector<QVariant> bindings = {},
|
||||
const QString &connection = "");
|
||||
/*! Run a delete statement against the database. */
|
||||
std::tuple<int, QSqlQuery>
|
||||
remove(const QString &query, const QVector<QVariant> &bindings = {},
|
||||
remove(const QString &query, QVector<QVariant> bindings = {},
|
||||
const QString &connection = "");
|
||||
|
||||
/*! Execute an SQL statement and return the boolean result and SqlQuery. */
|
||||
SqlQuery
|
||||
statement(const QString &query, const QVector<QVariant> &bindings = {},
|
||||
statement(const QString &query, QVector<QVariant> bindings = {},
|
||||
const QString &connection = "");
|
||||
/*! Run an SQL statement and get the number of rows affected. */
|
||||
std::tuple<int, QSqlQuery>
|
||||
affectingStatement(const QString &query, const QVector<QVariant> &bindings = {},
|
||||
affectingStatement(const QString &query, QVector<QVariant> bindings = {},
|
||||
const QString &connection = "");
|
||||
|
||||
/*! Run a raw, unprepared query against the database. */
|
||||
|
||||
@@ -67,43 +67,42 @@ namespace Orm
|
||||
|
||||
/*! Run a select statement against the database. */
|
||||
static SqlQuery
|
||||
select(const QString &query, const QVector<QVariant> &bindings = {},
|
||||
select(const QString &query, QVector<QVariant> bindings = {},
|
||||
const QString &connection = "");
|
||||
/*! Run a select statement against the database. */
|
||||
static SqlQuery
|
||||
selectFromWriteConnection(
|
||||
const QString &query, const QVector<QVariant> &bindings = {},
|
||||
const QString &connection = "");
|
||||
selectFromWriteConnection(const QString &query, QVector<QVariant> bindings = {},
|
||||
const QString &connection = "");
|
||||
|
||||
/*! Run a select statement and return a single result. */
|
||||
static SqlQuery
|
||||
selectOne(const QString &query, const QVector<QVariant> &bindings = {},
|
||||
selectOne(const QString &query, QVector<QVariant> bindings = {},
|
||||
const QString &connection = "");
|
||||
/*! Run a select statement and return the first column of the first row. */
|
||||
static QVariant
|
||||
scalar(const QString &query, const QVector<QVariant> &bindings = {},
|
||||
scalar(const QString &query, QVector<QVariant> bindings = {},
|
||||
const QString &connection = "");
|
||||
|
||||
/*! Run an insert statement against the database. */
|
||||
static SqlQuery
|
||||
insert(const QString &query, const QVector<QVariant> &bindings = {},
|
||||
insert(const QString &query, QVector<QVariant> bindings = {},
|
||||
const QString &connection = "");
|
||||
/*! Run an update statement against the database. */
|
||||
static std::tuple<int, QSqlQuery>
|
||||
update(const QString &query, const QVector<QVariant> &bindings = {},
|
||||
update(const QString &query, QVector<QVariant> bindings = {},
|
||||
const QString &connection = "");
|
||||
/*! Run a delete statement against the database. */
|
||||
static std::tuple<int, QSqlQuery>
|
||||
remove(const QString &query, const QVector<QVariant> &bindings = {},
|
||||
remove(const QString &query, QVector<QVariant> bindings = {},
|
||||
const QString &connection = "");
|
||||
|
||||
/*! Execute an SQL statement and return the boolean result and SqlQuery. */
|
||||
static SqlQuery
|
||||
statement(const QString &query, const QVector<QVariant> &bindings = {},
|
||||
statement(const QString &query, QVector<QVariant> bindings = {},
|
||||
const QString &connection = "");
|
||||
/*! Run an SQL statement and get the number of rows affected. */
|
||||
static std::tuple<int, QSqlQuery>
|
||||
affectingStatement(const QString &query, const QVector<QVariant> &bindings = {},
|
||||
affectingStatement(const QString &query, QVector<QVariant> bindings = {},
|
||||
const QString &connection = "");
|
||||
|
||||
/*! Run a raw, unprepared query against the database. */
|
||||
|
||||
@@ -110,11 +110,10 @@ std::shared_ptr<QueryBuilder> DatabaseConnection::query()
|
||||
/* Running SQL Queries */
|
||||
|
||||
SqlQuery
|
||||
DatabaseConnection::select(const QString &queryString,
|
||||
const QVector<QVariant> &bindings)
|
||||
DatabaseConnection::select(const QString &queryString, QVector<QVariant> bindings)
|
||||
{
|
||||
auto queryResult = run<QSqlQuery>(
|
||||
queryString, bindings, Prepared,
|
||||
queryString, std::move(bindings), Prepared,
|
||||
[this](const QString &queryString_,
|
||||
const QVector<QVariant> &preparedBindings)
|
||||
-> QSqlQuery
|
||||
@@ -149,10 +148,9 @@ DatabaseConnection::select(const QString &queryString,
|
||||
}
|
||||
|
||||
SqlQuery
|
||||
DatabaseConnection::selectOne(const QString &queryString,
|
||||
const QVector<QVariant> &bindings)
|
||||
DatabaseConnection::selectOne(const QString &queryString, QVector<QVariant> bindings)
|
||||
{
|
||||
auto query = select(queryString, bindings);
|
||||
auto query = select(queryString, std::move(bindings));
|
||||
|
||||
query.first();
|
||||
|
||||
@@ -160,9 +158,9 @@ DatabaseConnection::selectOne(const QString &queryString,
|
||||
}
|
||||
|
||||
QVariant
|
||||
DatabaseConnection::scalar(const QString &queryString, const QVector<QVariant> &bindings)
|
||||
DatabaseConnection::scalar(const QString &queryString, QVector<QVariant> bindings)
|
||||
{
|
||||
const auto query = selectOne(queryString, bindings);
|
||||
const auto query = selectOne(queryString, std::move(bindings));
|
||||
|
||||
// Nothing to do, the query should be positioned on the first row/record
|
||||
if (!query.isValid())
|
||||
@@ -176,11 +174,11 @@ DatabaseConnection::scalar(const QString &queryString, const QVector<QVariant> &
|
||||
return query.value(0);
|
||||
}
|
||||
|
||||
SqlQuery DatabaseConnection::statement(const QString &queryString,
|
||||
const QVector<QVariant> &bindings)
|
||||
SqlQuery
|
||||
DatabaseConnection::statement(const QString &queryString, QVector<QVariant> bindings)
|
||||
{
|
||||
auto queryResult = run<QSqlQuery>(
|
||||
queryString, bindings, Prepared,
|
||||
queryString, std::move(bindings), Prepared,
|
||||
[this](const QString &queryString_,
|
||||
const QVector<QVariant> &preparedBindings)
|
||||
-> QSqlQuery
|
||||
@@ -219,10 +217,10 @@ SqlQuery DatabaseConnection::statement(const QString &queryString,
|
||||
|
||||
std::tuple<int, QSqlQuery>
|
||||
DatabaseConnection::affectingStatement(const QString &queryString,
|
||||
const QVector<QVariant> &bindings)
|
||||
QVector<QVariant> bindings)
|
||||
{
|
||||
return run<std::tuple<int, QSqlQuery>>(
|
||||
queryString, bindings, Prepared,
|
||||
queryString, std::move(bindings), Prepared,
|
||||
[this](const QString &queryString_,
|
||||
const QVector<QVariant> &preparedBindings)
|
||||
-> std::tuple<int, QSqlQuery>
|
||||
@@ -359,9 +357,8 @@ QSqlQuery DatabaseConnection::getQtQuery()
|
||||
return QSqlQuery(getQtConnection());
|
||||
}
|
||||
|
||||
// TODO perf, modify bindings directly and return reference, debug impact silverqx
|
||||
QVector<QVariant>
|
||||
DatabaseConnection::prepareBindings(QVector<QVariant> bindings) const
|
||||
QVector<QVariant> &
|
||||
DatabaseConnection::prepareBindings(QVector<QVariant> &bindings) const
|
||||
{
|
||||
for (auto &binding : bindings) {
|
||||
// Nothing to convert
|
||||
|
||||
@@ -125,68 +125,68 @@ QSqlQuery DatabaseManager::qtQuery(const QString &connection)
|
||||
}
|
||||
|
||||
SqlQuery
|
||||
DatabaseManager::select(const QString &query, const QVector<QVariant> &bindings,
|
||||
DatabaseManager::select(const QString &query, QVector<QVariant> bindings,
|
||||
const QString &connection)
|
||||
{
|
||||
return this->connection(connection).select(query, bindings);
|
||||
return this->connection(connection).select(query, std::move(bindings));
|
||||
}
|
||||
|
||||
SqlQuery
|
||||
DatabaseManager::selectFromWriteConnection(
|
||||
const QString &query, const QVector<QVariant> &bindings,
|
||||
const QString &query, QVector<QVariant> bindings,
|
||||
const QString &connection)
|
||||
{
|
||||
return this->connection(connection).selectFromWriteConnection(query, bindings);
|
||||
return this->connection(connection)
|
||||
.selectFromWriteConnection(query, std::move(bindings));
|
||||
}
|
||||
|
||||
SqlQuery
|
||||
DatabaseManager::selectOne(const QString &query, const QVector<QVariant> &bindings,
|
||||
DatabaseManager::selectOne(const QString &query, QVector<QVariant> bindings,
|
||||
const QString &connection)
|
||||
{
|
||||
return this->connection(connection).selectOne(query, bindings);
|
||||
return this->connection(connection).selectOne(query, std::move(bindings));
|
||||
}
|
||||
|
||||
QVariant
|
||||
DatabaseManager::scalar(const QString &query, const QVector<QVariant> &bindings,
|
||||
DatabaseManager::scalar(const QString &query, QVector<QVariant> bindings,
|
||||
const QString &connection)
|
||||
{
|
||||
return this->connection(connection).scalar(query, bindings);
|
||||
return this->connection(connection).scalar(query, std::move(bindings));
|
||||
}
|
||||
|
||||
SqlQuery
|
||||
DatabaseManager::insert(const QString &query, const QVector<QVariant> &bindings,
|
||||
DatabaseManager::insert(const QString &query, QVector<QVariant> bindings,
|
||||
const QString &connection)
|
||||
{
|
||||
return this->connection(connection).insert(query, bindings);
|
||||
return this->connection(connection).insert(query, std::move(bindings));
|
||||
}
|
||||
|
||||
std::tuple<int, QSqlQuery>
|
||||
DatabaseManager::update(const QString &query, const QVector<QVariant> &bindings,
|
||||
DatabaseManager::update(const QString &query, QVector<QVariant> bindings,
|
||||
const QString &connection)
|
||||
{
|
||||
return this->connection(connection).update(query, bindings);
|
||||
return this->connection(connection).update(query, std::move(bindings));
|
||||
}
|
||||
|
||||
std::tuple<int, QSqlQuery>
|
||||
DatabaseManager::remove(const QString &query, const QVector<QVariant> &bindings,
|
||||
DatabaseManager::remove(const QString &query, QVector<QVariant> bindings,
|
||||
const QString &connection)
|
||||
{
|
||||
return this->connection(connection).remove(query, bindings);
|
||||
return this->connection(connection).remove(query, std::move(bindings));
|
||||
}
|
||||
|
||||
SqlQuery
|
||||
DatabaseManager::statement(const QString &query, const QVector<QVariant> &bindings,
|
||||
DatabaseManager::statement(const QString &query, QVector<QVariant> bindings,
|
||||
const QString &connection)
|
||||
{
|
||||
return this->connection(connection).statement(query, bindings);
|
||||
return this->connection(connection).statement(query, std::move(bindings));
|
||||
}
|
||||
|
||||
std::tuple<int, QSqlQuery>
|
||||
DatabaseManager::affectingStatement(
|
||||
const QString &query, const QVector<QVariant> &bindings,
|
||||
const QString &connection)
|
||||
DatabaseManager::affectingStatement(const QString &query, QVector<QVariant> bindings,
|
||||
const QString &connection)
|
||||
{
|
||||
return this->connection(connection).affectingStatement(query, bindings);
|
||||
return this->connection(connection).affectingStatement(query, std::move(bindings));
|
||||
}
|
||||
|
||||
SqlQuery DatabaseManager::unprepared(const QString &query,
|
||||
|
||||
@@ -59,66 +59,68 @@ QSqlQuery DB::qtQuery(const QString &connection)
|
||||
}
|
||||
|
||||
SqlQuery
|
||||
DB::select(const QString &query, const QVector<QVariant> &bindings,
|
||||
DB::select(const QString &query, QVector<QVariant> bindings,
|
||||
const QString &connection)
|
||||
{
|
||||
return manager().connection(connection).select(query, bindings);
|
||||
return manager().connection(connection).select(query, std::move(bindings));
|
||||
}
|
||||
|
||||
SqlQuery
|
||||
DB::selectFromWriteConnection(const QString &query, const QVector<QVariant> &bindings,
|
||||
DB::selectFromWriteConnection(const QString &query, QVector<QVariant> bindings,
|
||||
const QString &connection)
|
||||
{
|
||||
return manager().connection(connection).selectFromWriteConnection(query, bindings);
|
||||
return manager().connection(connection)
|
||||
.selectFromWriteConnection(query, std::move(bindings));
|
||||
}
|
||||
|
||||
SqlQuery
|
||||
DB::selectOne(const QString &query, const QVector<QVariant> &bindings,
|
||||
DB::selectOne(const QString &query, QVector<QVariant> bindings,
|
||||
const QString &connection)
|
||||
{
|
||||
return manager().connection(connection).selectOne(query, bindings);
|
||||
return manager().connection(connection).selectOne(query, std::move(bindings));
|
||||
}
|
||||
|
||||
QVariant
|
||||
DB::scalar(const QString &query, const QVector<QVariant> &bindings,
|
||||
DB::scalar(const QString &query, QVector<QVariant> bindings,
|
||||
const QString &connection)
|
||||
{
|
||||
return manager().connection(connection).scalar(query, bindings);
|
||||
return manager().connection(connection).scalar(query, std::move(bindings));
|
||||
}
|
||||
|
||||
SqlQuery
|
||||
DB::insert(const QString &query, const QVector<QVariant> &bindings,
|
||||
DB::insert(const QString &query, QVector<QVariant> bindings,
|
||||
const QString &connection)
|
||||
{
|
||||
return manager().connection(connection).insert(query, bindings);
|
||||
return manager().connection(connection).insert(query, std::move(bindings));
|
||||
}
|
||||
|
||||
std::tuple<int, QSqlQuery>
|
||||
DB::update(const QString &query, const QVector<QVariant> &bindings,
|
||||
DB::update(const QString &query, QVector<QVariant> bindings,
|
||||
const QString &connection)
|
||||
{
|
||||
return manager().connection(connection).update(query, bindings);
|
||||
return manager().connection(connection).update(query, std::move(bindings));
|
||||
}
|
||||
|
||||
std::tuple<int, QSqlQuery>
|
||||
DB::remove(const QString &query, const QVector<QVariant> &bindings,
|
||||
DB::remove(const QString &query, QVector<QVariant> bindings,
|
||||
const QString &connection)
|
||||
{
|
||||
return manager().connection(connection).remove(query, bindings);
|
||||
return manager().connection(connection).remove(query, std::move(bindings));
|
||||
}
|
||||
|
||||
SqlQuery
|
||||
DB::statement(const QString &query, const QVector<QVariant> &bindings,
|
||||
DB::statement(const QString &query, QVector<QVariant> bindings,
|
||||
const QString &connection)
|
||||
{
|
||||
return manager().connection(connection).statement(query, bindings);
|
||||
return manager().connection(connection).statement(query, std::move(bindings));
|
||||
}
|
||||
|
||||
std::tuple<int, QSqlQuery>
|
||||
DB::affectingStatement(const QString &query, const QVector<QVariant> &bindings,
|
||||
DB::affectingStatement(const QString &query, QVector<QVariant> bindings,
|
||||
const QString &connection)
|
||||
{
|
||||
return manager().connection(connection).affectingStatement(query, bindings);
|
||||
return manager().connection(connection)
|
||||
.affectingStatement(query, std::move(bindings));
|
||||
}
|
||||
|
||||
SqlQuery DB::unprepared(const QString &query,
|
||||
|
||||
@@ -344,7 +344,7 @@ void Builder::truncate()
|
||||
if (m_connection->driverName() == QPSQL)
|
||||
m_connection->unprepared(sql);
|
||||
else
|
||||
m_connection->statement(sql, bindings);
|
||||
m_connection->statement(sql, std::move(bindings));
|
||||
}
|
||||
|
||||
/* Select */
|
||||
|
||||
Reference in New Issue
Block a user