From 8d022f5322f89cf42680c50bdfcda07054dface8 Mon Sep 17 00:00:00 2001 From: totoro Date: Sat, 4 May 2024 11:47:03 +0900 Subject: [PATCH] add db_get_list_String with clause and binds --- controller/hk_sql_utils.anubis | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+), 0 deletions(-) diff --git a/controller/hk_sql_utils.anubis b/controller/hk_sql_utils.anubis index 7c1bc62..1854593 100644 --- a/controller/hk_sql_utils.anubis +++ b/controller/hk_sql_utils.anubis @@ -105,6 +105,29 @@ public define Int db_get_Int(db, clause, []) . +public define List(String) + db_get_List_String + ( + SQLite3DataBase db, + String clause, + List(SQLite3Bind) binds + )= + if sql_query_timeout(db, clause+";", binds, "db_get_List_String") is + { + error(sql_error) then println("db_get_List_String SQL ERROR '"+ sql_error.text + "'\n clause ["+clause+";]");[], + ok(_, cursor, _) then db_get_List_String(cursor) + } +. + +public define List(String) + db_get_List_String + ( + SQLite3DataBase db, + String clause + )= + db_get_List_String(db, clause, []) +. + public define Float get_count_float_by_full_clause ( -- libgit2 0.21.4