From 63b2ca0dbdae190941d60a55c9cff99d4a75a0e1 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 31 May 2021 13:18:17 +0100 Subject: Initial commit of prepstmt, selects, record sets This is full of holes, but all the basics are covered. --- lib/input/mysqlStmt.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lib/input/mysqlStmt.h (limited to 'lib/input/mysqlStmt.h') diff --git a/lib/input/mysqlStmt.h b/lib/input/mysqlStmt.h new file mode 100644 index 0000000..a42e0db --- /dev/null +++ b/lib/input/mysqlStmt.h @@ -0,0 +1,29 @@ +#ifndef MYGRATE_INPUT_MYSQLSTMT_H +#define MYGRATE_INPUT_MYSQLSTMT_H + +#include "dbConn.h" +#include "dbRecordSet.h" +#include "dbTypes.h" +#include +#include +#include +#include + +namespace MyGrate::Input { + using StmtPtr = std::unique_ptr; + + class MySQLPrepStmt : public DbPrepStmt { + public: + MySQLPrepStmt(const char * const q, MYSQL * c); + void execute(const std::initializer_list & vs) override; + + std::size_t rows() const override; + + RecordSetPtr recordSet() override; + + private: + StmtPtr stmt; + }; +} + +#endif -- cgit v1.2.3