bool SqlQuery::exec()
{
- qCDebug(lcSql) << "SQL exec" << _sql;
-
if (!_stmt) {
qCWarning(lcSql) << "Can't exec query, statement unprepared.";
return false;
qCWarning(lcSql) << "IOERR system errno: " << sqlite3_system_errno(_db);
#endif
}
- } else {
- qCDebug(lcSql) << "Last exec affected" << numRowsAffected() << "rows.";
}
return (_errId == SQLITE_DONE); // either SQLITE_ROW or SQLITE_DONE
}
template<class T, typename std::enable_if<std::is_enum<T>::value, int>::type = 0>
void bindValue(int pos, const T &value)
{
- qCDebug(lcSql) << "SQL bind" << pos << value;
bindValueInternal(pos, static_cast<int>(value));
}
template<class T, typename std::enable_if<!std::is_enum<T>::value, int>::type = 0>
void bindValue(int pos, const T &value)
{
- qCDebug(lcSql) << "SQL bind" << pos << value;
bindValueInternal(pos, value);
}
void bindValue(int pos, const QByteArray &value)
{
- qCDebug(lcSql) << "SQL bind" << pos << QString::fromUtf8(value);
bindValueInternal(pos, value);
}