-
Notifications
You must be signed in to change notification settings - Fork 23
/
gdsqlite.h
49 lines (38 loc) · 892 Bytes
/
gdsqlite.h
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
37
38
39
40
41
42
43
44
45
46
47
48
49
/* gdsqlite.h */
#ifndef GDSQLITE_H
#define GDSQLITE_H
#include "reference.h"
#include "ustring.h"
#include "map.h"
#include "sqlite/sqlite3.h"
class SQLite : public Reference {
GDCLASS(SQLite,Reference);
protected:
static void _bind_methods();
public:
SQLite();
int open(String path);
void prepare(String query);
int step();
int step_assoc();
Array fetch_assoc();
Array fetch_one();
Array fetch_array(String query);
int query(String query);
int get_data_count();
int get_column_count();
int get_column_int(int col);
double get_column_double(int col);
String get_column_text(int col);
int get_column_int_assoc(String col);
double get_column_double_assoc(String col);
String get_column_text_assoc(String col);
void finalize();
String get_errormsg();
void close();
private:
sqlite3 *db;
sqlite3_stmt *stmt;
Map<String, unsigned int> _row_names;
};
#endif