Commit 7f333a2aaa0f65a1c0abc66bf1327dde19661562

Authored by totoro
1 parent 18b5b14f

end of use of the calexium_lib/database/model/db_model.anubis

calexium_lib @ 94b434c75a4
1 -Subproject commit ac555606b821b42dda3018f3e64240790b038161 1 +Subproject commit 94b434c75a443c7426ce437df4224b61e3ecc1e2
hayamiki_lib @ d684d8d709b
1 -Subproject commit 5982fb919cc198b09154cab6aca30f83eadb5ef7 1 +Subproject commit d684d8d709b015c4d396c9b24f4e882628e3b65f
src/generation/columns.anubis
@@ -6,8 +6,11 @@ @@ -6,8 +6,11 @@
6 * © Calexium 6 * © Calexium
7 */ 7 */
8 8
  9 +read system/string.anubis
9 read hayamiki_lib/types/model/columns.anubis 10 read hayamiki_lib/types/model/columns.anubis
10 11
  12 +read fields.anubis
  13 +
11 define List(String) 14 define List(String)
12 /* return the list of all columns name 15 /* return the list of all columns name
13 */ 16 */
@@ -254,7 +257,7 @@ public define String @@ -254,7 +257,7 @@ public define String
254 indent+join(",\n"+indent, map((String text) |-> "text(\""+to_upper(text)+"\")", list_view)). 257 indent+join(",\n"+indent, map((String text) |-> "text(\""+to_upper(text)+"\")", list_view)).
255 258
256 public define Maybe(HK_Model_Column) 259 public define Maybe(HK_Model_Column)
257 - get_column_type 260 + get_column_type_from_name
258 ( 261 (
259 List(HK_Model_Column) columns, //columns in wich we search 262 List(HK_Model_Column) columns, //columns in wich we search
260 String name_to_find //Column name to find in previous list 263 String name_to_find //Column name to find in previous list
@@ -267,7 +270,7 @@ public define Maybe(HK_Model_Column) @@ -267,7 +270,7 @@ public define Maybe(HK_Model_Column)
267 if name_to_find = name then 270 if name_to_find = name then
268 success(h) 271 success(h)
269 else 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 public define String 276 public define String
src/generation/create_table.anubis
@@ -7,7 +7,7 @@ @@ -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 read tools/basis.anubis 11 read tools/basis.anubis
12 read tools/int.anubis 12 read tools/int.anubis
13 read system/string.anubis 13 read system/string.anubis
@@ -15,6 +15,11 @@ read system/files.anubis @@ -15,6 +15,11 @@ read system/files.anubis
15 read tools/streams.anubis 15 read tools/streams.anubis
16 read tools/ISO-8601.anubis 16 read tools/ISO-8601.anubis
17 17
  18 +read fields.anubis
  19 +read columns.anubis
  20 +
  21 +read utils/utils.anubis
  22 +
18 define String 23 define String
19 create_table_generate_one_column 24 create_table_generate_one_column
20 ( 25 (
src/generation/fields.anubis
@@ -6,7 +6,13 @@ @@ -6,7 +6,13 @@
6 * © Calexium 6 * © Calexium
7 */ 7 */
8 8
  9 +read system/string.anubis
  10 +read tools/basis.anubis
  11 +
9 read hayamiki_lib/types/model/fields.anubis 12 read hayamiki_lib/types/model/fields.anubis
  13 +read hayamiki_lib/types/model/columns.anubis
  14 +
  15 +read model.anubis
10 16
11 public define String 17 public define String
12 to_Anubis_type 18 to_Anubis_type
src/generation/files.anubis
@@ -10,6 +10,8 @@ read system/string.anubis @@ -10,6 +10,8 @@ read system/string.anubis
10 read system/files.anubis 10 read system/files.anubis
11 11
12 read hayamiki_lib/types/hayamiki.anubis 12 read hayamiki_lib/types/hayamiki.anubis
  13 +read hayamiki_lib/hk_generator.anubis
  14 +
13 read tools/basis.anubis 15 read tools/basis.anubis
14 read tools/streams.anubis 16 read tools/streams.anubis
15 read tools/ISO-8601.anubis 17 read tools/ISO-8601.anubis
@@ -192,7 +194,7 @@ define Maybe(One) @@ -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 hk_gen = 198 hk_gen =
197 hk_api(generate_model_files). 199 hk_api(generate_model_files).
198 200
src/generation/header.anubis
@@ -62,7 +62,7 @@ read data_base/db_tools.anubis @@ -62,7 +62,7 @@ read data_base/db_tools.anubis
62 read calexium_lib/database/db_utils.anubis 62 read calexium_lib/database/db_utils.anubis
63 read calexium_lib/database/db_types.anubis 63 read calexium_lib/database/db_types.anubis
64 read calexium_lib/database/vtm/view_table_types.anubis 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 read system/logger.anubis 67 read system/logger.anubis
68 read system/datetime.anubis 68 read system/datetime.anubis
src/generation/html.anubis
@@ -6,8 +6,12 @@ @@ -6,8 +6,12 @@
6 * © Calexium 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 read icons.anubis 13 read icons.anubis
  14 +read columns.anubis
11 15
12 public define String 16 public define String
13 to_HTML_cell_icon 17 to_HTML_cell_icon
@@ -44,7 +48,7 @@ public define String @@ -44,7 +48,7 @@ public define String
44 String data_name, 48 String data_name,
45 String general_type_name 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 failure then "column name "+column_name+"doesn't exist", 53 failure then "column name "+column_name+"doesn't exist",
50 success(column) then to_HTML_cell_link(column, data_name, general_type_name) 54 success(column) then to_HTML_cell_link(column, data_name, general_type_name)
@@ -60,7 +64,7 @@ public define String @@ -60,7 +64,7 @@ public define String
60 String data_name, 64 String data_name,
61 String general_type_name 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 failure then "column name "+column_name+"doesn't exist", 69 failure then "column name "+column_name+"doesn't exist",
66 success(column) then 70 success(column) then
src/generation/icons.anubis
@@ -6,7 +6,10 @@ @@ -6,7 +6,10 @@
6 * © Calexium 6 * © Calexium
7 */ 7 */
8 8
  9 +read calexium_lib/web/widgets/icons_set.anubis
  10 +
9 read hayamiki_lib/types/model/columns.anubis 11 read hayamiki_lib/types/model/columns.anubis
  12 +read hayamiki_lib/types/model/icons.anubis
10 13
11 public define String 14 public define String
12 /** to_String return the String of the given model of the column 'col' 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,6 +14,7 @@ read system/files.anubis
14 read tools/streams.anubis 14 read tools/streams.anubis
15 read tools/ISO-8601.anubis 15 read tools/ISO-8601.anubis
16 16
  17 +read utils/utils.anubis
17 18
18 define String 19 define String
19 generate_application_menu 20 generate_application_menu
@@ -43,7 +44,7 @@ define String @@ -43,7 +44,7 @@ define String
43 map((HK_List_View view ) |-> 44 map((HK_List_View view ) |->
44 with view_name = if view is list_view(v_name, _) then v_name else "default", 45 with view_name = if view is list_view(v_name, _) then v_name else "default",
45 indent+" "+"hk_menu_item("+fill("\""+table_name+"\",",max_space)+ "\"view_table\", "+ 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 "[(\"table_name\", "+fill("\""+table_name+"\",",max_space)+"),(\"view_name\", \""+view_name+"\")])", list_views), tables))+"\n"+indent+"])", apps)). 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,20 +73,15 @@ public define Maybe(One)
72 * Time: "+_Int_to_ISO_8601_time(now)+" 73 * Time: "+_Int_to_ISO_8601_time(now)+"
73 */ 74 */
74 75
75 -transmis calexium_lib/database/model/db_model.anubis  
76 transmit types/hk_menu_types.anubis 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 hk_menu_list(\"managers\", help_text_TAG(\"APPLICATIONS\"), 81 hk_menu_list(\"managers\", help_text_TAG(\"APPLICATIONS\"),
84 [\n"+ 82 [\n"+
85 generate_application_menu(apps, " ")+"\n 83 generate_application_menu(apps, " ")+"\n
86 - ]),  
87 - ]  
88 -).\n") 84 + ]).\n")
89 } 85 }
90 86
91 . 87 .
src/generation/model.anubis
@@ -6,8 +6,11 @@ @@ -6,8 +6,11 @@
6 * © Calexium 6 * © Calexium
7 */ 7 */
8 8
  9 +read system/string.anubis
9 10
10 -define String 11 +read hayamiki_lib/types/hayamiki.anubis
  12 +
  13 +public define String
11 format_attributes 14 format_attributes
12 ( 15 (
13 List(HK_Model_Attr) attributes 16 List(HK_Model_Attr) attributes
src/generation/types.anubis
@@ -10,7 +10,9 @@ read hayamiki_lib/types/hayamiki.anubis @@ -10,7 +10,9 @@ read hayamiki_lib/types/hayamiki.anubis
10 read tools/basis.anubis 10 read tools/basis.anubis
11 read tools/streams.anubis 11 read tools/streams.anubis
12 read system/string.anubis 12 read system/string.anubis
13 - 13 +read fields.anubis
  14 +read columns.anubis
  15 +read html.anubis
14 16
15 define List(String) 17 define List(String)
16 /** 18 /**
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 15
16 read tools/string.anubis 16 read tools/string.anubis
17 read tools/basis.anubis 17 read tools/basis.anubis
18 -//read generation/files.anubis 18 +read generation/files.anubis
19 read hayamiki_lib/hk_generator.anubis 19 read hayamiki_lib/hk_generator.anubis
20 read model.3.0.0.anubis 20 read model.3.0.0.anubis
21 21
src/utils/utils.anubis
@@ -6,6 +6,8 @@ @@ -6,6 +6,8 @@
6 * © Calexium 6 * © Calexium
7 */ 7 */
8 8
  9 +read tools/basis.anubis
  10 +read hayamiki_lib/types/hayamiki.anubis
9 11
10 public define Int 12 public define Int
11 longest_table_name_size 13 longest_table_name_size