diff --git a/database/db_get_helpers.anubis b/database/db_get_helpers.anubis index c336612..ce95a81 100644 --- a/database/db_get_helpers.anubis +++ b/database/db_get_helpers.anubis @@ -184,7 +184,32 @@ public define Maybe(DB_id) } . +// sqlite3 API +public define List(DB_id) + db_get_List_DB_id + ( + One -> SQLite3Row table_cursor, + List(DB_id) so_far + ) = + if table_cursor(unique) is + { + error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_List_DB_id")); reverse(so_far), + no_more_row then reverse(so_far), //can't find the symbol in the table, because the row is empty + row(explorer) then + with result = (Int)db_integer(explorer)(0), + db_get_List_DB_id(table_cursor, [db_id(result) . so_far]) + }. + +public define List(DB_id) + db_get_List_DB_id + ( + One -> SQLite3Row table_cursor + ) = + db_get_List_DB_id(table_cursor, []). + + /***********************************/ + /* SQLAPI */ public define List(Int) db_get_List_Int -- libgit2 0.21.4