pandemonium_engine/modules/database_sqlite/sqlite3_connection.h

37 lines
815 B
C++
Raw Normal View History

#ifndef SQLITE3_DATABASE_CONNECTION_H
#define SQLITE3_DATABASE_CONNECTION_H
#include "../database/database_connection.h"
#include "./sqlite/sqlite3.h"
class QueryBuilder;
class TableBuilder;
class QueryResult;
class Database;
struct sqlite3;
class SQLite3DatabaseConnection : public DatabaseConnection {
public:
friend class SQLite3PreparedStatement;
Error database_connect(const String &connection_str);
Ref<QueryResult> query(const String &query);
void query_run(const String &query);
Ref<QueryBuilder> get_query_builder();
Ref<TableBuilder> get_table_builder();
Ref<PreparedStatement> create_prepared_statement();
String escape(const String &str);
void escape_to(const String &str, String *to);
SQLite3DatabaseConnection();
~SQLite3DatabaseConnection();
protected:
sqlite3 *conn;
};
#endif