diff --git a/controller/hk_sql_utils.anubis b/controller/hk_sql_utils.anubis index 6ec5210..b3d8a35 100644 --- a/controller/hk_sql_utils.anubis +++ b/controller/hk_sql_utils.anubis @@ -127,6 +127,25 @@ public define List(Int) } . +public define List(DB_id) + get_db_ids_by_clause + ( + SQLite3DataBase db, + String table_name, + String clause + )= + with final_clause = if clause = "" then + "" + else + "WHERE "+clause, + + if sql_query_timeout(db, "SELECT \"id\" FROM "+table_name+" "+final_clause+";", [], "get_ids_by_clause") is + { + error(_) then [], + ok(_, cursor, _) then db_get_List_DB_id(cursor) + } +. + public define List(Int) get_ids_by_clause ( -- libgit2 0.21.4