CYCLUS
|
Thin wrapper class over sqlite3 prepared statements.
See http://sqlite.org/cintro.html for an overview of how prepared statements work.
Definition at line 22 of file sqlite_db.h.
#include <sqlite_db.h>
Public Types | |
typedef boost::shared_ptr< SqlStatement > | Ptr |
Public Member Functions | |
void | BindBlob (int i, const void *val, int n) |
void | BindDouble (int i, double val) |
void | BindInt (int i, int val) |
void | BindText (int i, const char *val) |
void | Exec () |
double | GetDouble (int col) |
int | GetInt (int col) |
char * | GetText (int col, int *n) |
void | Reset () |
bool | Step () |
~SqlStatement () | |
typedef boost::shared_ptr<SqlStatement> cyclus::SqlStatement::Ptr |
Definition at line 25 of file sqlite_db.h.
cyclus::SqlStatement::~SqlStatement | ( | ) |
Definition at line 12 of file sqlite_db.cc.
Binds the templated sql parameter at index i to the value pointed to by val.
n is the length in bytes of the value.
Definition at line 64 of file sqlite_db.cc.
Binds the templated sql parameter at index i to val.
Definition at line 56 of file sqlite_db.cc.
Binds the templated sql parameter at index i to val.
Definition at line 52 of file sqlite_db.cc.
Binds the templated sql parameter at index i to val.
Definition at line 60 of file sqlite_db.cc.
void cyclus::SqlStatement::Exec | ( | ) |
Executes the prepared statement.
Definition at line 16 of file sqlite_db.cc.
Returns a double value for the specified column of the current query row.
Definition at line 39 of file sqlite_db.cc.
Returns an int value for the specified column of the current query row.
Definition at line 35 of file sqlite_db.cc.
Returns a byte array value for the specified column of the current query row.
This can be used for retrieving TEXT and BLOB column data.
Definition at line 43 of file sqlite_db.cc.
void cyclus::SqlStatement::Reset | ( | ) |
Executes the prepared statement.
Definition at line 21 of file sqlite_db.cc.
bool cyclus::SqlStatement::Step | ( | ) |
Step to next row of previously executed query.
Returns false when there are no more rows. Previously retrieved text or blob column data memory is deallocated.
Definition at line 26 of file sqlite_db.cc.