Initial commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#ifndef SQLITE_STATEMENT_H
|
||||
#define SQLITE_STATEMENT_H
|
||||
|
||||
#include <sqlite3.h>
|
||||
#include <string>
|
||||
|
||||
class SQLiteStatement {
|
||||
private:
|
||||
sqlite3 *db_;
|
||||
sqlite3_stmt *stmt_; // Prepared statement
|
||||
|
||||
public:
|
||||
SQLiteStatement(sqlite3 *db, const std::string &query);
|
||||
~SQLiteStatement();
|
||||
|
||||
bool bind(int index, int value);
|
||||
bool bind(int index, double value);
|
||||
bool bind(int index, const std::string &value);
|
||||
bool bindNull(int index);
|
||||
|
||||
bool execute();
|
||||
bool step();
|
||||
|
||||
int changes();
|
||||
|
||||
void finalize();
|
||||
void reset();
|
||||
|
||||
int getColumnCount() const;
|
||||
std::string getColumnText(int column_index) const;
|
||||
};
|
||||
|
||||
#endif // SQLITE_STATEMENT_H
|
||||
Reference in New Issue
Block a user