Fix duplicate binds.

This commit is contained in:
Relintai 2022-07-06 12:53:54 +02:00
parent 66587299a8
commit 14b0d60d70
6 changed files with 6 additions and 8 deletions

View File

@ -20,7 +20,7 @@ Ref<DatabaseConnection> Database::_allocate_connection() {
//Ref<DatabaseConnection> dbc;
//dbc.instance();
//dbc->set_owner(this); //if needed
//dbc->connect(_connection_string);
//dbc->database_connect(_connection_string);
//return dbc;
return Ref<DatabaseConnection>();

View File

@ -5,7 +5,7 @@
#include "query_result.h"
#include "table_builder.h"
void DatabaseConnection::connect(const String &connection_str) {
void DatabaseConnection::database_connect(const String &connection_str) {
}
Ref<QueryResult> DatabaseConnection::query(const String &query) {
@ -46,7 +46,7 @@ DatabaseConnection::~DatabaseConnection() {
}
void DatabaseConnection::_bind_methods() {
ClassDB::bind_method(D_METHOD("connect", "connection_str"), &DatabaseConnection::connect);
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);

View File

@ -14,7 +14,7 @@ class DatabaseConnection : public Reference {
GDCLASS(DatabaseConnection, Reference);
public:
virtual void connect(const String &connection_str);
virtual void database_connect(const String &connection_str);
virtual Ref<QueryResult> query(const String &query);
virtual void query_run(const String &query);

View File

@ -33,7 +33,7 @@ Ref<DatabaseConnection> DatabaseMultiThreaded::_allocate_connection() {
Ref<DatabaseConnection> dbc;
dbc.instance();
dbc->set_owner(this);
dbc->connect(_connection_string);
dbc->database_connect(_connection_string);
return dbc;
}

View File

@ -17,7 +17,7 @@ Ref<DatabaseConnection> DatabaseSingleThreaded::_allocate_connection() {
Ref<DatabaseConnection> dbc;
dbc.instance();
dbc->set_owner(this);
dbc->connect(_connection_string);
dbc->database_connect(_connection_string);
return dbc;
}

View File

@ -356,8 +356,6 @@ void QueryBuilder::_bind_methods() {
ClassDB::bind_method(D_METHOD("order_by_asc", "col"), &QueryBuilder::_order_by_asc_bind);
ClassDB::bind_method(D_METHOD("order_by_desc", "col"), &QueryBuilder::_order_by_desc_bind);
ClassDB::bind_method(D_METHOD("order_by", "col"), &QueryBuilder::_order_by_bind);
ClassDB::bind_method(D_METHOD("order_by"), &QueryBuilder::_order_by_bind);
ClassDB::bind_method(D_METHOD("corder_by"), &QueryBuilder::_corder_by_bind);
ClassDB::bind_method(D_METHOD("order_by_add_col", "col"), &QueryBuilder::_order_by_add_col_bind);
ClassDB::bind_method(D_METHOD("asc", "col"), &QueryBuilder::_asc_bind, "");