diff --git a/database/db_get_helpers.anubis b/database/db_get_helpers.anubis index ce95a81..56c8827 100644 --- a/database/db_get_helpers.anubis +++ b/database/db_get_helpers.anubis @@ -151,7 +151,21 @@ public define Float error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_Float")); 0.0, no_more_row then 0.0, row(explorer) then db_float(explorer)(0) - }. + } +. + +public define Maybe(Float) + db_get_mb_Float + ( + One -> SQLite3Row table_cursor + ) = + if table_cursor(unique) is + { + error(sql_error) then logError("", "DB", db_error(sql_error, "db_get_Float")); failure, + no_more_row then failure, + row(explorer) then success(db_float(explorer)(0)) + } +. // sqlite3 API public define DB_id -- libgit2 0.21.4