Use StringBuilder in TableBuilder aswell.

This commit is contained in:
Relintai 2024-04-27 19:33:46 +02:00
parent e455b53c7b
commit c2561f4b96
2 changed files with 5 additions and 3 deletions

View File

@ -35,10 +35,11 @@
#include "query_result.h" #include "query_result.h"
String TableBuilder::get_result() { String TableBuilder::get_result() {
return result; return result.as_string();
} }
void TableBuilder::set_result(const String &val) { void TableBuilder::set_result(const String &val) {
result = val; result.clear();
result.append(val);
} }
TableBuilder *TableBuilder::create_table(const String &name) { TableBuilder *TableBuilder::create_table(const String &name) {

View File

@ -33,6 +33,7 @@
/*************************************************************************/ /*************************************************************************/
#include "core/string/ustring.h" #include "core/string/ustring.h"
#include "core/string/string_builder.h"
#include "core/object/reference.h" #include "core/object/reference.h"
@ -115,7 +116,7 @@ protected:
Ref<TableBuilder> _foreign_key_bind(const String &name); Ref<TableBuilder> _foreign_key_bind(const String &name);
Ref<TableBuilder> _references_bind(const String &table, const String &name); Ref<TableBuilder> _references_bind(const String &table, const String &name);
String result; StringBuilder result;
}; };
#endif #endif