src/db/databaseconnection.cpp
qint64 DatabaseConnection::doInsert(QSqlDatabase *db, const QString &stmt,
                                    const std::vector<QVariant> &args) {
  auto query = executeQuery(db, stmt, args);

  return query.lastInsertId().toLongLong();
}
// doInsert is a version of executeQuery that returns the last inserted id, rather than the
// underlying query/response
//
// Throws: QSqlError when a query error occurs
doInsert is a version of executeQuery that returns the last inserted id, rather than the
underlying query/response

QSqlError when a query error occurs
doInsert is a version of executeQuery that returns the last inserted id rather than the underlying query / response QSqlError when a query error occurs
qint64 DatabaseConnection::doInsert(QSqlDatabase *db, const QString &stmt,
                                    const std::vector<QVariant> &args) {
  auto query = executeQuery(db, stmt, args);
  return query.lastInsertId().toLongLong();
}
qint64 DatabaseConnection :: doInsert ( QSqlDatabase * db , const QString & stmt , const std :: vector < QVariant > & args ) { auto query = executeQuery ( db , stmt , args ) ; return query . lastInsertId ( ) . toLongLong ( ) ; }
doInsert is a version of executeQuery that returns the last inserted id, rather than the
underlying query/response
doInsert is a version of executeQuery that returns the last inserted id rather than the underlying query / response