refactor: rename DTree to DValue

This commit is contained in:
udo
2026-06-12 11:05:52 +00:00
parent 941f5aea08
commit 7066da3cde
157 changed files with 1203 additions and 1074 deletions
+11 -11
View File
@@ -147,10 +147,10 @@ bool SQLite::bind_params(void* statement, const StringMap& params)
return(true);
}
DTree SQLite::collect_rows(void* statement)
DValue SQLite::collect_rows(void* statement)
{
sqlite3_stmt* stmt = (sqlite3_stmt*)statement;
DTree result;
DValue result;
s32 column_count = sqlite3_column_count(stmt);
std::vector<String> column_names;
column_names.reserve(column_count);
@@ -161,7 +161,7 @@ DTree SQLite::collect_rows(void* statement)
s32 rc = sqlite3_step(stmt);
if(rc == SQLITE_ROW)
{
DTree row;
DValue row;
for(s32 i = 0; i < column_count; i++)
{
const String& name = column_names[i];
@@ -201,19 +201,19 @@ DTree SQLite::collect_rows(void* statement)
return(result);
}
set_error(rc, "sqlite step failed");
return(DTree());
return(DValue());
}
}
DTree SQLite::query(String q)
DValue SQLite::query(String q)
{
StringMap params;
return(query(q, params));
}
DTree SQLite::query(String q, const StringMap& params)
DValue SQLite::query(String q, const StringMap& params)
{
DTree result;
DValue result;
affected_rows = 0;
insert_id = 0;
error_code = SQLITE_OK;
@@ -309,17 +309,17 @@ String sqlite_error(SQLite* db)
return(db->error());
}
DTree sqlite_query(SQLite* db, String q)
DValue sqlite_query(SQLite* db, String q)
{
if(!db)
return(DTree());
return(DValue());
return(db->query(q));
}
DTree sqlite_query(SQLite* db, String q, const StringMap& params)
DValue sqlite_query(SQLite* db, String q, const StringMap& params)
{
if(!db)
return(DTree());
return(DValue());
return(db->query(q, params));
}