diff --git a/modules/database/table_builder.cpp b/modules/database/table_builder.cpp index 15c825066..0f97077e6 100644 --- a/modules/database/table_builder.cpp +++ b/modules/database/table_builder.cpp @@ -35,10 +35,11 @@ #include "query_result.h" String TableBuilder::get_result() { - return result; + return result.as_string(); } void TableBuilder::set_result(const String &val) { - result = val; + result.clear(); + result.append(val); } TableBuilder *TableBuilder::create_table(const String &name) { diff --git a/modules/database/table_builder.h b/modules/database/table_builder.h index 5fd41bfdd..c42a164d3 100644 --- a/modules/database/table_builder.h +++ b/modules/database/table_builder.h @@ -33,6 +33,7 @@ /*************************************************************************/ #include "core/string/ustring.h" +#include "core/string/string_builder.h" #include "core/object/reference.h" @@ -115,7 +116,7 @@ protected: Ref _foreign_key_bind(const String &name); Ref _references_bind(const String &table, const String &name); - String result; + StringBuilder result; }; #endif