blob: e4b056c30232ae955240154c04467211096f019e (
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
|
#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;
};
}
#endif
|