1 #ifndef s11n_net_SQ3_SETTINGS_DB_INCLUDED
2 #define s11n_net_SQ3_SETTINGS_DB_INCLUDED 1
65 int clear( std::string
const & where );
70 void set( std::string
const & key,
int val );
74 void set( std::string
const & key, sqlite_int64 val );
78 void set( std::string
const & key,
bool val );
82 void set( std::string
const & key,
double val );
86 void set( std::string
const & key, std::string
const & val );
90 void set( std::string
const & key,
char const * val );
98 bool get( std::string
const & key,
int & val );
100 bool get( std::string
const & key, sqlite_int64 & val );
102 bool get( std::string
const & key,
bool & val );
104 bool get( std::string
const & key,
double & val );
106 bool get( std::string
const & key, std::string & val );
110 virtual int on_open();
116 #endif // s11n_net_SQ3_SETTINGS_DB_INCLUDED
Encapsulates a connection to an sqlite database.
settings_db ia a very simplistic key/value pair database for use with the sq3 database layer...
settings_db()
Creates an unopened database.
virtual int clear()
Overridden to just empty the settings db.
The sq3 namespace encapsulates an OO sqlite3 API very similar to the sqlite3x API, but this one uses no exception handling (i.e., it doesn't throw on errors).
void set(std::string const &key, int val)
Sets the given key/value pair.
~settings_db()
Closes this database.