diff --git a/calexium_lib/database/db_utils.anubis b/calexium_lib/database/db_utils.anubis index eb576db..839d0de 100644 --- a/calexium_lib/database/db_utils.anubis +++ b/calexium_lib/database/db_utils.anubis @@ -87,6 +87,22 @@ public define Maybe(SQLite3HeadersOrRow -> SQLite3Row) public define List(String) db_get_string_list ( + One -> SQLite3Row table_cursor, + List(String) so_far + ) = + if table_cursor(unique) is + { + error(sql_error) then logError("DB", db_error(sql_error, "db_get_string_list")); 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 s = text(explorer)(0), + db_get_string_list(table_cursor, [s . so_far]) + }. + +// Old sqlite3 API +public define List(String) + db_get_string_list + ( SQLite3HeadersOrRow -> SQLite3Row table_cursor, List(String) so_far ) = @@ -115,5 +131,23 @@ public define List(Int) }. +public define List(Int) + db_get_integer_list + ( + One -> SQLite3Row table_cursor, + List(Int) so_far + ) = + if table_cursor(unique) is + { + error(sql_error) then logError("DB", db_error(sql_error, "db_get_integer_list")); 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 s = (Int)db_integer(explorer)(0), + db_get_integer_list(table_cursor, [s . so_far]) + }. + + + + -- libgit2 0.21.4