1 #ifndef s11n_net_SQLITE3X_SETTINGS_DB_INCLUDED 2 #define s11n_net_SQLITE3X_SETTINGS_DB_INCLUDED 1 4 #include "sqlite3x.hpp" 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 );
128 #endif // s11n_net_SQLITE3X_SETTINGS_DB_INCLUDED settings_db()
Creates an unopened database.
settings_db ia a very simplistic settings-data database for use with the sqlite3x database layer...
bool is_open() const
Returns true if open() has succeeded.
This namespace encapsulates a C++ API wrapper for sqlite3 databases.
Represents a connection to an sqlite3 database.
void clear()
Empties the database.
void close()
Closes this database.
~settings_db()
Closes this database.
void open(std::string const &dbname)
Opens the database dbname or throws on error.
sqlite3_connection * db()
If you want low-level info about the db, here's the handle to it.