Пример #1
0
bool SQLiteStatement::step()
{
    ErrorCode ec;
    bool result = step(ec);
    ec.check_();
    return result;
}
Пример #2
0
Transaction::Transaction(SQLite & db)
    : db_(&db), ok_(false)
{
    ErrorCode ec;
    db_->exec("begin", ec);
    if(ec)
        db_ = 0;
    ec.check_();
}
Пример #3
0
SQLiteStatement::SQLiteStatement(SQLite & db, const std::wstring & sql)
    : db_(db)
#if !defined(MLOG_NO_LOGGING)
          , sql_(mstd::utf8(sql))
#endif
{
    ErrorCode ec;
    handle_ = sqlitePrepare(db, sql_, ec);
    ec.check_();
}
Пример #4
0
SQLite::SQLite(const std::string & filename)
{
    ErrorCode ec;
    handle_ = sqliteOpen(filename, ec);
    ec.check_();
}
Пример #5
0
void Transaction::commit()
{
    ErrorCode ec;
    commit(ec);
    ec.check_();
}