forked from anse1/sqlsmith
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sqlite.hh
36 lines (29 loc) · 703 Bytes
/
sqlite.hh
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
34
35
36
/// @file
/// @brief schema and dut classes for SQLite 3
#ifndef SQLITE_HH
#define SQLITE_HH
extern "C" {
#include <sqlite3.h>
}
#include "schema.hh"
#include "relmodel.hh"
#include "dut.hh"
struct sqlite_connection {
sqlite3 *db;
char *zErrMsg = 0;
int rc;
void q(const char *query);
sqlite_connection(std::string &conninfo);
~sqlite_connection();
};
struct schema_sqlite : schema, sqlite_connection {
schema_sqlite(std::string &conninfo, bool no_catalog);
virtual std::string quote_name(const std::string &id) {
return id;
}
};
struct dut_sqlite : dut_base, sqlite_connection {
virtual void test(const std::string &stmt);
dut_sqlite(std::string &conninfo);
};
#endif