diff --git a/modules/database/table_builder.cpp b/modules/database/table_builder.cpp index 644412e40..15c825066 100644 --- a/modules/database/table_builder.cpp +++ b/modules/database/table_builder.cpp @@ -132,6 +132,10 @@ Ref TableBuilder::run() { void TableBuilder::run_query() { } +void TableBuilder::clear() { + result.clear(); +} + void TableBuilder::print() { //printf("%s\n", result.get_data()); print_error(result); diff --git a/modules/database/table_builder.h b/modules/database/table_builder.h index f603faa14..5fd41bfdd 100644 --- a/modules/database/table_builder.h +++ b/modules/database/table_builder.h @@ -77,13 +77,13 @@ public: virtual Ref run(); virtual void run_query(); + void clear(); + void print(); TableBuilder(); virtual ~TableBuilder(); - String result; - protected: static void _bind_methods(); @@ -114,6 +114,8 @@ protected: Ref _foreign_key_bind(const String &name); Ref _references_bind(const String &table, const String &name); + + String result; }; #endif diff --git a/modules/web/database/http_session_manager_db.cpp b/modules/web/database/http_session_manager_db.cpp index 9050927e5..aecd378ca 100644 --- a/modules/web/database/http_session_manager_db.cpp +++ b/modules/web/database/http_session_manager_db.cpp @@ -251,7 +251,7 @@ void HTTPSessionManagerDB::_create_table() { // tb->print(); tb->run_query(); - tb->result = ""; + tb->clear(); tb->create_table(_database_data_table_name); tb->integer("session_db_id")->not_null()->next_row();