From c2561f4b96f88821fbeeb49482f957986b69a67f Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 27 Apr 2024 19:33:46 +0200 Subject: [PATCH] Use StringBuilder in TableBuilder aswell. --- modules/database/table_builder.cpp | 5 +++-- modules/database/table_builder.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) 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