blob: 4a4ad8f2684055bd3d523d60cb40a4e6521c1d78 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#ifndef MYGRATE_INPUT_MYSQLSTMT_H
#define MYGRATE_INPUT_MYSQLSTMT_H
#include "dbConn.h"
#include "dbRecordSet.h"
#include <cstddef>
#include <initializer_list>
#include <memory>
#include <mysql.h>
namespace MyGrate {
class DbValue;
}
namespace MyGrate::Input {
using StmtPtr = std::unique_ptr<MYSQL_STMT, decltype(&mysql_stmt_close)>;
class MySQLPrepStmt : public DbPrepStmt {
public:
MySQLPrepStmt(const char * const q, MYSQL * c);
void execute(const std::span<const DbValue> vs) override;
std::size_t rows() const override;
RecordSetPtr recordSet() override;
CursorPtr cursor() override;
private:
StmtPtr stmt;
};
}
#endif
|