22 const QSqlDatabase DB_;
25 const QString InsertSuffix_;
29 , InsertSuffix_ {
" INTO " + data.Table_ +
30 " (" + data.Fields_.join (
", ") +
") VALUES (" +
31 data.BoundFields_.join (
", ") +
");" }
37 auto& query = Queries_ [action.
Selector_.index ()];
40 query = std::make_shared<QSqlQuery> (DB_);
41 query->prepare (GetInsertPrefix (action) + InsertSuffix_);
49 [] (InsertAction::DefaultTag) { return
"INSERT"; },
50 [] (InsertAction::IgnoreTag) { return
"INSERT OR IGNORE"; },
60 inline static const QString
IntAutoincrement {
"INTEGER PRIMARY KEY AUTOINCREMENT" };
61 inline static const QString
Binary {
"BLOB" };
68 return std::make_unique<InsertQueryBuilder> (db, data);