paulftw / hiberlite

C++ ORM for SQLite
BSD 3-Clause "New" or "Revised" License
714 stars 118 forks source link

Transactions #18

Open johnkea opened 8 years ago

johnkea commented 8 years ago

Please, more control over transactions is required. Create is working too slow because of many transactions. The temporal solution in my case was commenting the following "dbExecQuery"s:

template<class C>
void Database::dbUpdate(bean_key key, C& bean)
{
    try{
//      dbExecQuery(key.con,"ROLLBACK TRANSACTION;");
    }catch(...){}
//  dbExecQuery(key.con,"BEGIN TRANSACTION;");

    ChildKiller ck;
    ck.killChildren(key,bean);
    BeanUpdater u;
    u.update(key, bean);

//  dbExecQuery(key.con,"COMMIT TRANSACTION;");
}

But thank you for the useful tool!

MastaChimp commented 6 years ago

I know it's been awhile, but do you have any results as to how this worked out? Did it cause any errors to comment out those lines?