24 QString {
"SELECT sql FROM sqlite_master WHERE type = 'table' AND name = '%1'" }
43 template<
typename Record,
typename ImplFactory = SQLiteImplFactory>
46 const auto&
baseName = Record::ClassName ();
55 <<
db.connectionName ();
61 <<
db.connectionName ();
71 QString {
"INSERT INTO %2 (%1) SELECT %1 FROM %3;" }
80 QString {
"ALTER TABLE %1 RENAME TO %2;" }
Provides database transaction lock.
UTIL_DB_API void Init()
Initializes the transaction.
QSqlQuery RunTextQuery(const QSqlDatabase &db, const QString &text)
Runs the given query text on the given db.
bool MatchesSchema(const QString &baseName, const QString &schema, QSqlDatabase &db)
void Migrate(QSqlDatabase &db)
Container< T > Filter(const Container< T > &c, F f)