Newer
Older
#ifndef __VEREIGN_SQLITE_CONNECTION_HH
#define __VEREIGN_SQLITE_CONNECTION_HH
struct sqlite3;
struct sqlite3_stmt;
namespace vereign::sqlite {
class Connection {
public:
Connection(const std::string& path);
~Connection() noexcept;
Connection(const Connection&) = delete;
auto operator=(const Connection&) -> Connection& = delete;
void BeginExplicitTransaction();
void Commit();
void Rollback();
void Execute(const std::string& sql);
auto Prepare(const std::string& sql) -> Statement;
private:
sqlite3* db_;
};
} // namespace vereign::sqlite
#endif // __VEREIGN_SQLITE_CONNECTION_HH