diff --git a/src/generation/types.anubis b/src/generation/types.anubis index 5e96d94..ad6f69a 100644 --- a/src/generation/types.anubis +++ b/src/generation/types.anubis @@ -285,7 +285,19 @@ public define Maybe(One) " SQLite3DataBase db,\n"+ " Int idx\n"+ " )=\n"+ - " get_"+name+"(db, to_decimal(idx))." + " get_"+name+"(db, to_decimal(idx)).\n\n"+ + "public define Maybe("+type_name+")\n"+ + " get_"+name+"\n"+ + " (\n"+ + " SQLite3DataBase db,\n"+ + " DB_id idx\n"+ + " )=\n"+ + " if idx is\n"+ + " {\n"+ + " none then failure,\n"+ + " db_id(_idx) then get_"+name+"(db, to_decimal(_idx))\n"+ + " }"+ + ".\n\n" ) is //end of the function { failure then println("can't write generate_get_one "+type_name); failure, -- libgit2 0.21.4