rcpp_framework/database_backends/sqlite/sqlite3_database.h

40 lines
810 B
C
Raw Normal View History

2020-11-28 14:30:50 +01:00
#ifndef SQLITE3_CONNECTION
#define SQLITE3_CONNECTION
#include "database/database.h"
2020-11-28 14:30:50 +01:00
//Brynet has it aswell, and because of using namespace it is defined here aswell
//later this will be fixed better
//#ifdef IS_NUM
//#undef IS_NUM
//#endif
#include <cstdio>
#include "./sqlite/sqlite3.h"
2020-11-28 14:30:50 +01:00
class SQLite3Database : public Database {
2020-11-28 14:30:50 +01:00
public:
static Database *_creation_func();
static void _register();
static void _unregister();
Ref<QueryBuilder> get_query_builder();
Ref<TableBuilder> get_table_builder();
2021-08-19 22:18:11 +02:00
void connect(const String &connection_str);
Ref<QueryResult> query(const String &query);
void query_run(const String &query);
2020-11-28 14:30:50 +01:00
String escape(const String str);
void escape(const String str, String *to);
SQLite3Database();
~SQLite3Database();
2020-11-28 14:30:50 +01:00
sqlite3 *conn;
};
//#undef IS_NUM
#endif