From dcaff5c863a648a8805733381f53c682fa8e8805 Mon Sep 17 00:00:00 2001 From: totoro Date: Tue, 17 Apr 2018 23:01:56 +0200 Subject: [PATCH] add __HK_SHOW_STRING__ as column to return if no column is requested add the generation of global define of "vtm_vxxx" which will be load during initialization of the target application --- src/generation/create_table.anubis | 14 ++++++++++++++ src/generation/types.anubis | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/generation/create_table.anubis b/src/generation/create_table.anubis index f93cf79..81f683b 100644 --- a/src/generation/create_table.anubis +++ b/src/generation/create_table.anubis @@ -309,6 +309,20 @@ global define Migration = migration(db_model_version, migrate_to_v"+version_str+", create_v"+version_str+"_tables, create_v"+version_str+"_indexes) . + +read hayamiki_lib/view/view_table_manager_types.anubis +read src/database/generated/vtm.anubis + +global define VTM + vtm_v"+version_str+" + = + vtm( + db_model_version, + vtm_view_list(generated_vtm_view_list), + vtm_edit_list(generated_vtm_edit_list), + generated_hk_table_controller_list + ) +. ") }}} . diff --git a/src/generation/types.anubis b/src/generation/types.anubis index e40da37..c70319a 100644 --- a/src/generation/types.anubis +++ b/src/generation/types.anubis @@ -220,7 +220,7 @@ public define Maybe(One) " Bool resolve_fk,\n"+ " DB_id idx\n"+ " )=\n"+ -" with final_columns = if length(columns) = 0 then [\"id\". "+name+"_columns] else columns,\n"+ +" with final_columns = if length(columns) = 0 then [\"id\", \"__HK_SHOW_STRING__\". "+name+"_columns] else columns,\n"+ " with error = json_object(map((String col_name) |-> json_member(col_name, json_null), final_columns)),\n"+ "\n"+ " if idx is\n"+ -- libgit2 0.21.4