-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsqliteconfig.h
More file actions
35 lines (25 loc) · 845 Bytes
/
sqliteconfig.h
File metadata and controls
35 lines (25 loc) · 845 Bytes
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
#ifndef _SQLITECONFIG_H_
#define _SQLITECONFIG_H_
#include "qtlconfig.h"
#include <qtl_sqlite.hpp>
struct sqlite_connection : public connection_config
{
std::string _filename;
qtl::sqlite::database _db;
sqlite_connection() { }
virtual bool open() override;
std::string template_file() const override;
virtual void scan_tables(std::vector<std::unique_ptr<qtlstmt>>& queries) override;
virtual std::string escape_token(const std::string& text) override;
};
struct sqlite_stmt : public qtlstmt
{
explicit sqlite_stmt(sqlite_connection& connection) : _connection(connection) { }
virtual void init_fields() override;
virtual void init_primaries() override;
private:
sqlite_connection& _connection;
static std::string convert_type(const char* data_type);
static std::string convert_type(int field);
};
#endif //_SQLITECONFIG_H_