1#ifndef s11n_net_SQLITE3X_SETTINGS_DB_INCLUDED
2#define s11n_net_SQLITE3X_SETTINGS_DB_INCLUDED 1
61 void clear( std::string
const & where );
66 void set( std::string
const & key,
int val );
70 void set( std::string
const & key, sqlite_int64 val );
74 void set( std::string
const & key,
bool val );
78 void set( std::string
const & key,
double val );
82 void set( std::string
const & key, std::string
const & val );
86 void set( std::string
const & key,
char const * val );
94 bool get( std::string
const & key,
int & val );
96 bool get( std::string
const & key, sqlite_int64 & val );
98 bool get( std::string
const & key,
bool & val );
100 bool get( std::string
const & key,
double & val );
102 bool get( std::string
const & key, std::string & val );
107 void open( std::string
const & dbname );
void clear()
Empties the database.
void open(std::string const &dbname)
Opens the database dbname or throws on error.
settings_db()
Creates an unopened database.
~settings_db()
Closes this database.
bool is_open() const
Returns true if open() has succeeded.
sqlite3_connection * db()
If you want low-level info about the db, here's the handle to it.
bool get(std::string const &key, int &val)
Fetches the given key from the db.
void set(std::string const &key, int val)
Sets the given key/value pair.
void close()
Closes this database.
Represents a connection to an sqlite3 database.
This namespace encapsulates a C++ API wrapper for sqlite3 databases.