summaryrefslogtreecommitdiff
path: root/lib/dbConn.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dbConn.h')
-rw-r--r--lib/dbConn.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/dbConn.h b/lib/dbConn.h
index 26b9a64..e4b056c 100644
--- a/lib/dbConn.h
+++ b/lib/dbConn.h
@@ -1,13 +1,27 @@
#ifndef MYGRATE_DBCONN_H
#define MYGRATE_DBCONN_H
+#include <dbRecordSet.h>
#include <dbTypes.h>
#include <initializer_list>
namespace MyGrate {
+ class DbPrepStmt {
+ public:
+ virtual ~DbPrepStmt() = default;
+ virtual void execute(const std::initializer_list<DbValue> &) = 0;
+ virtual std::size_t rows() const = 0;
+ virtual RecordSetPtr recordSet() = 0;
+ };
+ using DbPrepStmtPtr = std::unique_ptr<DbPrepStmt>;
+
class DbConn {
+ public:
+ virtual ~DbConn() = default;
virtual void query(const char * const) = 0;
virtual void query(const char * const, const std::initializer_list<DbValue> &) = 0;
+
+ virtual DbPrepStmtPtr prepare(const char * const, std::size_t nParams) = 0;
};
}