Commit dcaff5c863a648a8805733381f53c682fa8e8805
1 parent
c58b8847
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
Showing
2 changed files
with
15 additions
and
1 deletions
Show diff stats
src/generation/create_table.anubis
| ... | ... | @@ -309,6 +309,20 @@ global define Migration |
| 309 | 309 | = |
| 310 | 310 | migration(db_model_version, migrate_to_v"+version_str+", create_v"+version_str+"_tables, create_v"+version_str+"_indexes) |
| 311 | 311 | . |
| 312 | + | |
| 313 | +read hayamiki_lib/view/view_table_manager_types.anubis | |
| 314 | +read src/database/generated/vtm.anubis | |
| 315 | + | |
| 316 | +global define VTM | |
| 317 | + vtm_v"+version_str+" | |
| 318 | + = | |
| 319 | + vtm( | |
| 320 | + db_model_version, | |
| 321 | + vtm_view_list(generated_vtm_view_list), | |
| 322 | + vtm_edit_list(generated_vtm_edit_list), | |
| 323 | + generated_hk_table_controller_list | |
| 324 | + ) | |
| 325 | +. | |
| 312 | 326 | ") |
| 313 | 327 | }}} |
| 314 | 328 | . | ... | ... |
src/generation/types.anubis
| ... | ... | @@ -220,7 +220,7 @@ public define Maybe(One) |
| 220 | 220 | " Bool resolve_fk,\n"+ |
| 221 | 221 | " DB_id idx\n"+ |
| 222 | 222 | " )=\n"+ |
| 223 | -" with final_columns = if length(columns) = 0 then [\"id\". "+name+"_columns] else columns,\n"+ | |
| 223 | +" with final_columns = if length(columns) = 0 then [\"id\", \"__HK_SHOW_STRING__\". "+name+"_columns] else columns,\n"+ | |
| 224 | 224 | " with error = json_object(map((String col_name) |-> json_member(col_name, json_null), final_columns)),\n"+ |
| 225 | 225 | "\n"+ |
| 226 | 226 | " if idx is\n"+ | ... | ... |