Ignore:
Timestamp:
04/09/10 14:02:26 (12 years ago)
Author:
kirilma <kirilma@…>
Branches:
master, qt5
Children:
f548c17
Parents:
5bd6aba
Message:

use transactions to make import faster

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sql/sqlengine.cpp

    r5bd6aba r1bad318  
    376376}
    377377
     378bool SqlEngine::beginTransaction()
     379{
     380    QSqlDatabase db = QSqlDatabase::database();
     381
     382    return execQuery(db, "BEGIN IMMEDIATE TRANSACTION");
     383}
     384
     385bool SqlEngine::commitTransaction()
     386{
     387    QSqlDatabase db = QSqlDatabase::database();
     388
     389    return execQuery(db, "COMMIT");
     390}
     391
    378392bool SqlEngine::execQuery(QSqlDatabase &aDatabase, const QString &aQuery)
    379393{
Note: See TracChangeset for help on using the changeset viewer.