Hide result String in TableBuilder. Also add clear() method to it.

This commit is contained in:
Relintai 2024-04-27 19:32:29 +02:00
parent e845f2f905
commit e455b53c7b
3 changed files with 9 additions and 3 deletions

View File

@ -132,6 +132,10 @@ Ref<QueryResult> TableBuilder::run() {
void TableBuilder::run_query() {
}
void TableBuilder::clear() {
result.clear();
}
void TableBuilder::print() {
//printf("%s\n", result.get_data());
print_error(result);

View File

@ -77,13 +77,13 @@ public:
virtual Ref<QueryResult> 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<TableBuilder> _foreign_key_bind(const String &name);
Ref<TableBuilder> _references_bind(const String &table, const String &name);
String result;
};
#endif

View File

@ -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();