1 #ifndef s11n_net_SQLITE3X_HPP_INCLUDED
2 #define s11n_net_SQLITE3X_HPP_INCLUDED
94 #ifndef SQLITE3X_USE_WCHAR
95 # ifdef _GLIBCXX_USE_WCHAR_T
96 # define SQLITE3X_USE_WCHAR 1
97 # elif defined(UNICODE) // Windows uses this
98 # define SQLITE3X_USE_WCHAR 1
100 # define SQLITE3X_USE_WCHAR 0 // default
157 mutable struct sqlite3 *m_db;
172 sqlite3 *
db()
const;
205 std::string
name()
const;
231 virtual void open(
char const * );
236 void open(std::string
const &dbname);
259 void take( sqlite3 * dbh );
266 sqlite3 *
take()
throw();
376 int executecallback( std::string
const & sql, sqlite3_callback callback,
void * data, std::string & errmsg );
383 int executecallback( std::string
const & sql, sqlite3_callback callback,
void * data = 0 );
394 #if SQLITE3X_USE_WCHAR
402 std::wstring executestring16(
const std::wstring &sql);
403 std::wstring executestring16(
const std::string &sql);
405 void open(
const wchar_t *dbname);
557 char const *
getstring(
int index,
int & size);
563 std::string
getblob(
int index);
571 void const *
getblob(
int index,
int & size );
581 #if SQLITE3X_USE_WCHAR
582 std::wstring getstring16(
int index);
583 std::wstring getcolname16(
int index);
600 mutable sqlite3_stmt *stmt;
632 void prepare(
char const * sql,
int len = -1 );
636 void prepare( std::string
const & sql );
641 void bind(
int index);
645 void bind(
int index,
int data);
653 void bind(
int index,
double data);
659 void bind(
int index,
const char *data,
int datalen = -1);
665 void bind(
int index,
const void *data,
int datalen);
669 void bind(
int index,
const std::string &data);
764 #if SQLITE3X_USE_WCHAR
766 void bind(
int index,
const wchar_t *data,
int datalen);
767 void bind(
int index,
const std::wstring &data);
768 std::wstring executestring16();
769 #endif // SQLITE3_USE_WCHAR
798 virtual char const *
what()
const throw();
916 #endif // s11n_net_SQLITE3X_HPP_INCLUDED