Commit 7f333a2aaa0f65a1c0abc66bf1327dde19661562
1 parent
18b5b14f
end of use of the calexium_lib/database/model/db_model.anubis
Showing
14 changed files
with
48 additions
and
22 deletions
Show diff stats
calexium_lib @ 94b434c75a4
hayamiki_lib @ d684d8d709b
src/generation/columns.anubis
| ... | ... | @@ -6,8 +6,11 @@ |
| 6 | 6 | * © Calexium |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | +read system/string.anubis | |
| 9 | 10 | read hayamiki_lib/types/model/columns.anubis |
| 10 | 11 | |
| 12 | +read fields.anubis | |
| 13 | + | |
| 11 | 14 | define List(String) |
| 12 | 15 | /* return the list of all columns name |
| 13 | 16 | */ |
| ... | ... | @@ -254,7 +257,7 @@ public define String |
| 254 | 257 | indent+join(",\n"+indent, map((String text) |-> "text(\""+to_upper(text)+"\")", list_view)). |
| 255 | 258 | |
| 256 | 259 | public define Maybe(HK_Model_Column) |
| 257 | - get_column_type | |
| 260 | + get_column_type_from_name | |
| 258 | 261 | ( |
| 259 | 262 | List(HK_Model_Column) columns, //columns in wich we search |
| 260 | 263 | String name_to_find //Column name to find in previous list |
| ... | ... | @@ -267,7 +270,7 @@ public define Maybe(HK_Model_Column) |
| 267 | 270 | if name_to_find = name then |
| 268 | 271 | success(h) |
| 269 | 272 | else |
| 270 | - get_column_type(t, name_to_find) | |
| 273 | + get_column_type_from_name(t, name_to_find) | |
| 271 | 274 | }. |
| 272 | 275 | |
| 273 | 276 | public define String | ... | ... |
src/generation/create_table.anubis
| ... | ... | @@ -7,7 +7,7 @@ |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | |
| 10 | -read calexium_lib/database/model/db_model.anubis | |
| 10 | +read hayamiki_lib/types/hayamiki.anubis | |
| 11 | 11 | read tools/basis.anubis |
| 12 | 12 | read tools/int.anubis |
| 13 | 13 | read system/string.anubis |
| ... | ... | @@ -15,6 +15,11 @@ read system/files.anubis |
| 15 | 15 | read tools/streams.anubis |
| 16 | 16 | read tools/ISO-8601.anubis |
| 17 | 17 | |
| 18 | +read fields.anubis | |
| 19 | +read columns.anubis | |
| 20 | + | |
| 21 | +read utils/utils.anubis | |
| 22 | + | |
| 18 | 23 | define String |
| 19 | 24 | create_table_generate_one_column |
| 20 | 25 | ( | ... | ... |
src/generation/fields.anubis
| ... | ... | @@ -6,7 +6,13 @@ |
| 6 | 6 | * © Calexium |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | +read system/string.anubis | |
| 10 | +read tools/basis.anubis | |
| 11 | + | |
| 9 | 12 | read hayamiki_lib/types/model/fields.anubis |
| 13 | +read hayamiki_lib/types/model/columns.anubis | |
| 14 | + | |
| 15 | +read model.anubis | |
| 10 | 16 | |
| 11 | 17 | public define String |
| 12 | 18 | to_Anubis_type | ... | ... |
src/generation/files.anubis
| ... | ... | @@ -10,6 +10,8 @@ read system/string.anubis |
| 10 | 10 | read system/files.anubis |
| 11 | 11 | |
| 12 | 12 | read hayamiki_lib/types/hayamiki.anubis |
| 13 | +read hayamiki_lib/hk_generator.anubis | |
| 14 | + | |
| 13 | 15 | read tools/basis.anubis |
| 14 | 16 | read tools/streams.anubis |
| 15 | 17 | read tools/ISO-8601.anubis |
| ... | ... | @@ -192,7 +194,7 @@ define Maybe(One) |
| 192 | 194 | }. |
| 193 | 195 | |
| 194 | 196 | |
| 195 | -global define HK_API | |
| 197 | +global define HK_Generator_API | |
| 196 | 198 | hk_gen = |
| 197 | 199 | hk_api(generate_model_files). |
| 198 | 200 | ... | ... |
src/generation/header.anubis
| ... | ... | @@ -62,7 +62,7 @@ read data_base/db_tools.anubis |
| 62 | 62 | read calexium_lib/database/db_utils.anubis |
| 63 | 63 | read calexium_lib/database/db_types.anubis |
| 64 | 64 | read calexium_lib/database/vtm/view_table_types.anubis |
| 65 | -read calexium_lib/database/model/db_model.anubis | |
| 65 | +read hayamiki_lib/types/hayamiki.anubis | |
| 66 | 66 | |
| 67 | 67 | read system/logger.anubis |
| 68 | 68 | read system/datetime.anubis | ... | ... |
src/generation/html.anubis
| ... | ... | @@ -6,8 +6,12 @@ |
| 6 | 6 | * © Calexium |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | -read hayamiki_lib/types/model/columns.anubis | |
| 9 | +read system/string.anubis | |
| 10 | +read tools/basis.anubis | |
| 11 | + | |
| 12 | +read hayamiki_lib/types/hayamiki.anubis | |
| 10 | 13 | read icons.anubis |
| 14 | +read columns.anubis | |
| 11 | 15 | |
| 12 | 16 | public define String |
| 13 | 17 | to_HTML_cell_icon |
| ... | ... | @@ -44,7 +48,7 @@ public define String |
| 44 | 48 | String data_name, |
| 45 | 49 | String general_type_name |
| 46 | 50 | )= |
| 47 | - if get_column_type(columns, column_name) is | |
| 51 | + if get_column_type_from_name(columns, column_name) is | |
| 48 | 52 | { |
| 49 | 53 | failure then "column name "+column_name+"doesn't exist", |
| 50 | 54 | success(column) then to_HTML_cell_link(column, data_name, general_type_name) |
| ... | ... | @@ -60,7 +64,7 @@ public define String |
| 60 | 64 | String data_name, |
| 61 | 65 | String general_type_name |
| 62 | 66 | )= |
| 63 | - if get_column_type(columns, column_name) is | |
| 67 | + if get_column_type_from_name(columns, column_name) is | |
| 64 | 68 | { |
| 65 | 69 | failure then "column name "+column_name+"doesn't exist", |
| 66 | 70 | success(column) then | ... | ... |
src/generation/icons.anubis
| ... | ... | @@ -6,7 +6,10 @@ |
| 6 | 6 | * © Calexium |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | +read calexium_lib/web/widgets/icons_set.anubis | |
| 10 | + | |
| 9 | 11 | read hayamiki_lib/types/model/columns.anubis |
| 12 | +read hayamiki_lib/types/model/icons.anubis | |
| 10 | 13 | |
| 11 | 14 | public define String |
| 12 | 15 | /** to_String return the String of the given model of the column 'col' | ... | ... |
src/generation/menu.anubis
| ... | ... | @@ -14,6 +14,7 @@ read system/files.anubis |
| 14 | 14 | read tools/streams.anubis |
| 15 | 15 | read tools/ISO-8601.anubis |
| 16 | 16 | |
| 17 | +read utils/utils.anubis | |
| 17 | 18 | |
| 18 | 19 | define String |
| 19 | 20 | generate_application_menu |
| ... | ... | @@ -43,7 +44,7 @@ define String |
| 43 | 44 | map((HK_List_View view ) |-> |
| 44 | 45 | with view_name = if view is list_view(v_name, _) then v_name else "default", |
| 45 | 46 | indent+" "+"hk_menu_item("+fill("\""+table_name+"\",",max_space)+ "\"view_table\", "+ |
| 46 | - fill_or_cut("\""+short_name+(if view_name="default" then "" else " "+view_name)+"\",",max_space, ' ')+ | |
| 47 | + fill("help_text(\""+short_name+(if view_name="default" then "" else " "+view_name)+"\"),",max_space)+ | |
| 47 | 48 | "[(\"table_name\", "+fill("\""+table_name+"\",",max_space)+"),(\"view_name\", \""+view_name+"\")])", list_views), tables))+"\n"+indent+"])", apps)). |
| 48 | 49 | |
| 49 | 50 | |
| ... | ... | @@ -72,20 +73,15 @@ public define Maybe(One) |
| 72 | 73 | * Time: "+_Int_to_ISO_8601_time(now)+" |
| 73 | 74 | */ |
| 74 | 75 | |
| 75 | -transmis calexium_lib/database/model/db_model.anubis | |
| 76 | 76 | transmit types/hk_menu_types.anubis |
| 77 | 77 | |
| 78 | -public define HK_Menu | |
| 79 | - admin_menu | |
| 78 | +public define HK_Menu_Item | |
| 79 | + applications_menu | |
| 80 | 80 | = |
| 81 | -hk_menu([ | |
| 82 | - hk_menu_item(\"\", \"\", \"HOME\", []), | |
| 83 | 81 | hk_menu_list(\"managers\", help_text_TAG(\"APPLICATIONS\"), |
| 84 | 82 | [\n"+ |
| 85 | 83 | generate_application_menu(apps, " ")+"\n |
| 86 | - ]), | |
| 87 | - ] | |
| 88 | -).\n") | |
| 84 | + ]).\n") | |
| 89 | 85 | } |
| 90 | 86 | |
| 91 | 87 | . | ... | ... |
src/generation/model.anubis
src/generation/types.anubis
src/main.anubis