summaryrefslogtreecommitdiff
path: root/src/dal/sqlitedataprovider.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dal/sqlitedataprovider.h')
-rw-r--r--src/dal/sqlitedataprovider.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/dal/sqlitedataprovider.h b/src/dal/sqlitedataprovider.h
index 8950f312..3f1951d2 100644
--- a/src/dal/sqlitedataprovider.h
+++ b/src/dal/sqlitedataprovider.h
@@ -146,6 +146,39 @@ class SqLiteDataProvider: public DataProvider
const unsigned int
getLastId(void) const;
+ /**
+ * Prepare SQL statement
+ */
+ bool prepareSql(const std::string &sql);
+
+ /**
+ * Process SQL statement
+ * SQL statement needs to be prepared and parameters binded before
+ * calling this function
+ */
+ const RecordSet& processSql();
+
+ /**
+ * Bind String
+ * @param place - which parameter to bind to
+ * @param value - the string to bind
+ */
+ void bindString(int place, const std::string &value);
+
+ /**
+ * Bind Integer
+ * @param place - which parameter to bind to
+ * @param value - the integer to bind
+ */
+ void bindInteger(int place, int value);
+
+ /**
+ * Bind Float
+ * @param place - which parameter to bind to
+ * @param value - the float to bind
+ */
+ void bindFloat(int place, float value);
+
private:
/** defines the name of the database config parameter */
@@ -162,7 +195,8 @@ class SqLiteDataProvider: public DataProvider
const bool
inTransaction(void) const;
- sqlite3* mDb; /**< the handle to the database connection */
+ sqlite3 *mDb; /**< the handle to the database connection */
+ sqlite3_stmt *mStmt; /**< the prepared statement to process */
};