#include "database_connection.h" #include "database.h" #include "query_builder.h" #include "query_result.h" #include "table_builder.h" void DatabaseConnection::database_connect(const String &connection_str) { } Ref DatabaseConnection::query(const String &query) { return Ref(); } void DatabaseConnection::query_run(const String &query) { } Ref DatabaseConnection::get_query_builder() { return Ref(new QueryBuilder()); } Ref DatabaseConnection::get_table_builder() { return Ref(new TableBuilder()); } String DatabaseConnection::escape(const String &str) { return String(); } void DatabaseConnection::escape_to(const String &str, String *to) { } Ref DatabaseConnection::get_owner() { return Ref(_owner); } void DatabaseConnection::set_owner(Database *owner) { _owner = owner; } DatabaseConnection::DatabaseConnection() { _owner = nullptr; } DatabaseConnection::~DatabaseConnection() { _owner = nullptr; } void DatabaseConnection::_bind_methods() { ClassDB::bind_method(D_METHOD("database_connect", "connection_str"), &DatabaseConnection::database_connect); ClassDB::bind_method(D_METHOD("query", "query"), &DatabaseConnection::query); ClassDB::bind_method(D_METHOD("query_run", "query"), &DatabaseConnection::query_run); ClassDB::bind_method(D_METHOD("get_query_builder"), &DatabaseConnection::get_query_builder); ClassDB::bind_method(D_METHOD("get_table_builder"), &DatabaseConnection::get_table_builder); ClassDB::bind_method(D_METHOD("escape", "str"), &DatabaseConnection::escape); ClassDB::bind_method(D_METHOD("get_owner"), &DatabaseConnection::get_owner); }