Commit 1fd8afcbd896495c05e0256570f4472ccb980998
1 parent
b28ba961
add active_filters in HK_foreign_key
Showing
16 changed files
with
74 additions
and
32 deletions
Show diff stats
ds_files/graphviz.gv
| 1 | /* | 1 | /* |
| 2 | * Created by 伝作 (Densaku). | 2 | * Created by 伝作 (Densaku). |
| 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) | 3 | * Types & Messages generator written by フランスのトトロ aka (David RENÉ) |
| 4 | - * Date: 2018-11-10 | ||
| 5 | - * Time: 17:14:38 | 4 | + * Date: 2019-07-14 |
| 5 | + * Time: 16:15:41 | ||
| 6 | * | 6 | * |
| 7 | */ | 7 | */ |
| 8 | 8 | ||
| @@ -159,6 +159,7 @@ digraph DS { | @@ -159,6 +159,7 @@ digraph DS { | ||
| 159 | <TR><TD ALIGN="LEFT"><B><FONT COLOR="mediumblue">HK_App_Name</FONT></B></TD><TD ALIGN="LEFT" PORT="foreign_key_app_name" >app_name</TD></TR> | 159 | <TR><TD ALIGN="LEFT"><B><FONT COLOR="mediumblue">HK_App_Name</FONT></B></TD><TD ALIGN="LEFT" PORT="foreign_key_app_name" >app_name</TD></TR> |
| 160 | <TR><TD ALIGN="LEFT"><B><FONT COLOR="darkviolet">String</FONT></B></TD><TD ALIGN="LEFT" PORT="foreign_key_table_name" >table_name</TD></TR> | 160 | <TR><TD ALIGN="LEFT"><B><FONT COLOR="darkviolet">String</FONT></B></TD><TD ALIGN="LEFT" PORT="foreign_key_table_name" >table_name</TD></TR> |
| 161 | <TR><TD ALIGN="LEFT"><B><FONT COLOR="darkviolet">List</FONT>(<FONT COLOR="darkviolet">String</FONT>)</B></TD><TD ALIGN="LEFT" PORT="foreign_key_searchable_fields" >searchable_fields</TD></TR> | 161 | <TR><TD ALIGN="LEFT"><B><FONT COLOR="darkviolet">List</FONT>(<FONT COLOR="darkviolet">String</FONT>)</B></TD><TD ALIGN="LEFT" PORT="foreign_key_searchable_fields" >searchable_fields</TD></TR> |
| 162 | + <TR><TD ALIGN="LEFT"><B><FONT COLOR="darkviolet">List</FONT>(<FONT COLOR="mediumblue">HK_Foreign_Key_Active_Filter</FONT>)</B></TD><TD ALIGN="LEFT" PORT="foreign_key_hk_fk_active_filter" >hk_fk_active_filter</TD></TR> | ||
| 162 | <TR><TD ALIGN="LEFT"><B><FONT COLOR="darkviolet">List</FONT>(<FONT COLOR="mediumblue">HK_Foreign_Key_Clause</FONT>)</B></TD><TD ALIGN="LEFT" PORT="foreign_key_hk_fk_clause" >hk_fk_clause</TD></TR> | 163 | <TR><TD ALIGN="LEFT"><B><FONT COLOR="darkviolet">List</FONT>(<FONT COLOR="mediumblue">HK_Foreign_Key_Clause</FONT>)</B></TD><TD ALIGN="LEFT" PORT="foreign_key_hk_fk_clause" >hk_fk_clause</TD></TR> |
| 163 | <TR><TD COLSPAN="2" VALIGN="MIDDLE" ALIGN="LEFT"><FONT COLOR="orangered"><B>)</B></FONT></TD></TR> | 164 | <TR><TD COLSPAN="2" VALIGN="MIDDLE" ALIGN="LEFT"><FONT COLOR="orangered"><B>)</B></FONT></TD></TR> |
| 164 | 165 | ||
| @@ -199,6 +200,7 @@ digraph DS { | @@ -199,6 +200,7 @@ digraph DS { | ||
| 199 | HK_Model_Field:char_field_choices -> HK_Text_Choices:TYPE | 200 | HK_Model_Field:char_field_choices -> HK_Text_Choices:TYPE |
| 200 | HK_Model_Field:integer_field_choices -> HK_Int_Choices:TYPE | 201 | HK_Model_Field:integer_field_choices -> HK_Int_Choices:TYPE |
| 201 | HK_Model_Field:foreign_key_app_name -> HK_App_Name:TYPE | 202 | HK_Model_Field:foreign_key_app_name -> HK_App_Name:TYPE |
| 203 | + HK_Model_Field:foreign_key_hk_fk_active_filter -> HK_Foreign_Key_Active_Filter:TYPE | ||
| 202 | HK_Model_Field:foreign_key_hk_fk_clause -> HK_Foreign_Key_Clause:TYPE | 204 | HK_Model_Field:foreign_key_hk_fk_clause -> HK_Foreign_Key_Clause:TYPE |
| 203 | HK_Model_Field:datetime_field_hk_dt_f_attr -> HK_Datetime_Field_Attr:TYPE | 205 | HK_Model_Field:datetime_field_hk_dt_f_attr -> HK_Datetime_Field_Attr:TYPE |
| 204 | HK_Model_Field:time_field_hk_dt_f_attr -> HK_Datetime_Field_Attr:TYPE | 206 | HK_Model_Field:time_field_hk_dt_f_attr -> HK_Datetime_Field_Attr:TYPE |
| @@ -256,6 +258,20 @@ digraph DS { | @@ -256,6 +258,20 @@ digraph DS { | ||
| 256 | HK_Foreign_Key_Clause:on_delete_on_delete -> HK_Foreign_Key_Clause_On_Directive:TYPE | 258 | HK_Foreign_Key_Clause:on_delete_on_delete -> HK_Foreign_Key_Clause_On_Directive:TYPE |
| 257 | 259 | ||
| 258 | 260 | ||
| 261 | + HK_Foreign_Key_Active_Filter [ label=< | ||
| 262 | + <TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" CELLPADDING="2" BGCOLOR="gray95"> | ||
| 263 | + <TR><TD COLSPAN="2" PORT="TYPE" VALIGN="MIDDLE" ALIGN="CENTER" BGCOLOR="lightblue" ><FONT COLOR="mediumblue"><B>HK_Foreign_Key_Active_Filter</B></FONT></TD></TR> | ||
| 264 | + | ||
| 265 | + <TR><TD COLSPAN="2" PORT="alt:active_filter" VALIGN="MIDDLE" BGCOLOR="bisque" ALIGN="LEFT"><FONT COLOR="orangered"><B>active_filter (</B></FONT></TD></TR> | ||
| 266 | + <TR><TD ALIGN="LEFT"><B><FONT COLOR="darkviolet">String</FONT></B></TD><TD ALIGN="LEFT" PORT="active_filter_column" >column</TD></TR> | ||
| 267 | + <TR><TD ALIGN="LEFT"><B><FONT COLOR="darkviolet">String</FONT></B></TD><TD ALIGN="LEFT" PORT="active_filter_fk_column" >fk_column</TD></TR> | ||
| 268 | + <TR><TD COLSPAN="2" VALIGN="MIDDLE" ALIGN="LEFT"><FONT COLOR="orangered"><B>)</B></FONT></TD></TR> | ||
| 269 | + | ||
| 270 | + </TABLE> | ||
| 271 | + >]; | ||
| 272 | + | ||
| 273 | + | ||
| 274 | + | ||
| 259 | HK_Int_Choices [ label=< | 275 | HK_Int_Choices [ label=< |
| 260 | <TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" CELLPADDING="2" BGCOLOR="gray95"> | 276 | <TABLE BORDER="1" CELLBORDER="0" CELLSPACING="0" CELLPADDING="2" BGCOLOR="gray95"> |
| 261 | <TR><TD COLSPAN="2" PORT="TYPE" VALIGN="MIDDLE" ALIGN="CENTER" BGCOLOR="lightblue" ><FONT COLOR="mediumblue"><B>HK_Int_Choices</B></FONT></TD></TR> | 277 | <TR><TD COLSPAN="2" PORT="TYPE" VALIGN="MIDDLE" ALIGN="CENTER" BGCOLOR="lightblue" ><FONT COLOR="mediumblue"><B>HK_Int_Choices</B></FONT></TD></TR> |
hayamiki_ds_types.aproj
| @@ -26,6 +26,9 @@ | @@ -26,6 +26,9 @@ | ||
| 26 | <Compile Include="hayamiki_ds_types.anubis" /> | 26 | <Compile Include="hayamiki_ds_types.anubis" /> |
| 27 | <Compile Include="hayamiki_lib\controller\hk_controller.anubis" /> | 27 | <Compile Include="hayamiki_lib\controller\hk_controller.anubis" /> |
| 28 | <Compile Include="hayamiki_lib\controller\hk_delete.anubis" /> | 28 | <Compile Include="hayamiki_lib\controller\hk_delete.anubis" /> |
| 29 | + <Compile Include="hayamiki_lib\controller\hk_rows_import.anubis" /> | ||
| 30 | + <Compile Include="hayamiki_lib\controller\hk_sql_utils.anubis" /> | ||
| 31 | + <Compile Include="hayamiki_lib\controller\hk_trigger.anubis" /> | ||
| 29 | <Compile Include="hayamiki_lib\ds_files\ds_types.anubis" /> | 32 | <Compile Include="hayamiki_lib\ds_files\ds_types.anubis" /> |
| 30 | <Compile Include="hayamiki_lib\hk_generator.anubis" /> | 33 | <Compile Include="hayamiki_lib\hk_generator.anubis" /> |
| 31 | <Compile Include="hayamiki_lib\model\app.anubis" /> | 34 | <Compile Include="hayamiki_lib\model\app.anubis" /> |
| @@ -39,29 +42,47 @@ | @@ -39,29 +42,47 @@ | ||
| 39 | <Compile Include="hayamiki_lib\model\tables.anubis" /> | 42 | <Compile Include="hayamiki_lib\model\tables.anubis" /> |
| 40 | <Compile Include="hayamiki_lib\model\types\hk_app.anubis" /> | 43 | <Compile Include="hayamiki_lib\model\types\hk_app.anubis" /> |
| 41 | <Compile Include="hayamiki_lib\model\types\hk_app_name.anubis" /> | 44 | <Compile Include="hayamiki_lib\model\types\hk_app_name.anubis" /> |
| 45 | + <Compile Include="hayamiki_lib\model\types\hk_constraint.anubis" /> | ||
| 42 | <Compile Include="hayamiki_lib\model\types\hk_database.anubis" /> | 46 | <Compile Include="hayamiki_lib\model\types\hk_database.anubis" /> |
| 43 | <Compile Include="hayamiki_lib\model\types\hk_datetime_field_attr.anubis" /> | 47 | <Compile Include="hayamiki_lib\model\types\hk_datetime_field_attr.anubis" /> |
| 44 | - <Compile Include="hayamiki_lib\model\types\hk_display.anubis" /> | ||
| 45 | - <Compile Include="hayamiki_lib\model\types\hk_edit_view.anubis" /> | 48 | + <Compile Include="hayamiki_lib\model\types\hk_foreign_key_active_filter.anubis" /> |
| 49 | + <Compile Include="hayamiki_lib\model\types\hk_foreign_key_clause.anubis" /> | ||
| 50 | + <Compile Include="hayamiki_lib\model\types\hk_foreign_key_clause_on_directive.anubis" /> | ||
| 46 | <Compile Include="hayamiki_lib\model\types\hk_help_text.anubis" /> | 51 | <Compile Include="hayamiki_lib\model\types\hk_help_text.anubis" /> |
| 47 | <Compile Include="hayamiki_lib\model\types\hk_icon.anubis" /> | 52 | <Compile Include="hayamiki_lib\model\types\hk_icon.anubis" /> |
| 48 | <Compile Include="hayamiki_lib\model\types\hk_int_choice.anubis" /> | 53 | <Compile Include="hayamiki_lib\model\types\hk_int_choice.anubis" /> |
| 49 | <Compile Include="hayamiki_lib\model\types\hk_int_choices.anubis" /> | 54 | <Compile Include="hayamiki_lib\model\types\hk_int_choices.anubis" /> |
| 50 | - <Compile Include="hayamiki_lib\model\types\hk_list_view.anubis" /> | ||
| 51 | <Compile Include="hayamiki_lib\model\types\hk_model.anubis" /> | 55 | <Compile Include="hayamiki_lib\model\types\hk_model.anubis" /> |
| 52 | <Compile Include="hayamiki_lib\model\types\hk_model_attr.anubis" /> | 56 | <Compile Include="hayamiki_lib\model\types\hk_model_attr.anubis" /> |
| 53 | <Compile Include="hayamiki_lib\model\types\hk_model_column.anubis" /> | 57 | <Compile Include="hayamiki_lib\model\types\hk_model_column.anubis" /> |
| 54 | <Compile Include="hayamiki_lib\model\types\hk_model_field.anubis" /> | 58 | <Compile Include="hayamiki_lib\model\types\hk_model_field.anubis" /> |
| 59 | + <Compile Include="hayamiki_lib\model\types\hk_on_conflict.anubis" /> | ||
| 60 | + <Compile Include="hayamiki_lib\model\types\hk_phone_field_attr.anubis" /> | ||
| 55 | <Compile Include="hayamiki_lib\model\types\hk_table.anubis" /> | 61 | <Compile Include="hayamiki_lib\model\types\hk_table.anubis" /> |
| 56 | <Compile Include="hayamiki_lib\model\types\hk_text_choice.anubis" /> | 62 | <Compile Include="hayamiki_lib\model\types\hk_text_choice.anubis" /> |
| 57 | <Compile Include="hayamiki_lib\model\types\hk_text_choices.anubis" /> | 63 | <Compile Include="hayamiki_lib\model\types\hk_text_choices.anubis" /> |
| 58 | <Compile Include="hayamiki_lib\model\types\hk_text_field_attr.anubis" /> | 64 | <Compile Include="hayamiki_lib\model\types\hk_text_field_attr.anubis" /> |
| 59 | <Compile Include="hayamiki_lib\types\hayamiki.anubis" /> | 65 | <Compile Include="hayamiki_lib\types\hayamiki.anubis" /> |
| 66 | + <Compile Include="hayamiki_lib\view\hk_filter.anubis" /> | ||
| 67 | + <Compile Include="hayamiki_lib\view\jqgrid.anubis" /> | ||
| 68 | + <Compile Include="hayamiki_lib\view\load_vtm.anubis" /> | ||
| 69 | + <Compile Include="hayamiki_lib\view\types\hk_display.anubis" /> | ||
| 70 | + <Compile Include="hayamiki_lib\view\types\hk_editor.anubis" /> | ||
| 71 | + <Compile Include="hayamiki_lib\view\types\hk_editor_table.anubis" /> | ||
| 72 | + <Compile Include="hayamiki_lib\view\types\hk_filter.anubis" /> | ||
| 73 | + <Compile Include="hayamiki_lib\view\types\hk_fk_view.anubis" /> | ||
| 74 | + <Compile Include="hayamiki_lib\view\types\hk_form.anubis" /> | ||
| 75 | + <Compile Include="hayamiki_lib\view\types\hk_form_entry.anubis" /> | ||
| 76 | + <Compile Include="hayamiki_lib\view\types\hk_form_tab.anubis" /> | ||
| 77 | + <Compile Include="hayamiki_lib\view\types\hk_form_table.anubis" /> | ||
| 78 | + <Compile Include="hayamiki_lib\view\types\hk_view.anubis" /> | ||
| 79 | + <Compile Include="hayamiki_lib\view\types\hk_viewer.anubis" /> | ||
| 60 | <Compile Include="hayamiki_lib\view\view_apps_renderer.anubis" /> | 80 | <Compile Include="hayamiki_lib\view\view_apps_renderer.anubis" /> |
| 81 | + <Compile Include="hayamiki_lib\view\view_editor_renderer.anubis" /> | ||
| 82 | + <Compile Include="hayamiki_lib\view\view_rows_import.anubis" /> | ||
| 61 | <Compile Include="hayamiki_lib\view\view_table_manager.anubis" /> | 83 | <Compile Include="hayamiki_lib\view\view_table_manager.anubis" /> |
| 62 | <Compile Include="hayamiki_lib\view\view_table_manager_types.anubis" /> | 84 | <Compile Include="hayamiki_lib\view\view_table_manager_types.anubis" /> |
| 63 | <Compile Include="hayamiki_lib\view\view_table_renderer.anubis" /> | 85 | <Compile Include="hayamiki_lib\view\view_table_renderer.anubis" /> |
| 64 | - <Compile Include="hayamiki_lib\view\view_table_types.anubis" /> | ||
| 65 | <Compile Include="hayamiki_lib\view\web_action.anubis" /> | 86 | <Compile Include="hayamiki_lib\view\web_action.anubis" /> |
| 66 | </ItemGroup> | 87 | </ItemGroup> |
| 67 | <ItemGroup> | 88 | <ItemGroup> |
| @@ -72,5 +93,6 @@ | @@ -72,5 +93,6 @@ | ||
| 72 | <Folder Include="hayamiki_lib\model\types" /> | 93 | <Folder Include="hayamiki_lib\model\types" /> |
| 73 | <Folder Include="hayamiki_lib\types" /> | 94 | <Folder Include="hayamiki_lib\types" /> |
| 74 | <Folder Include="hayamiki_lib\view" /> | 95 | <Folder Include="hayamiki_lib\view" /> |
| 96 | + <Folder Include="hayamiki_lib\view\types" /> | ||
| 75 | </ItemGroup> | 97 | </ItemGroup> |
| 76 | </Project> | 98 | </Project> |
| 77 | \ No newline at end of file | 99 | \ No newline at end of file |
hayamiki_generator.aproj
| @@ -147,6 +147,7 @@ | @@ -147,6 +147,7 @@ | ||
| 147 | <Compile Include="hayamiki_lib\model\types\hk_constraint.anubis" /> | 147 | <Compile Include="hayamiki_lib\model\types\hk_constraint.anubis" /> |
| 148 | <Compile Include="hayamiki_lib\model\types\hk_database.anubis" /> | 148 | <Compile Include="hayamiki_lib\model\types\hk_database.anubis" /> |
| 149 | <Compile Include="hayamiki_lib\model\types\hk_datetime_field_attr.anubis" /> | 149 | <Compile Include="hayamiki_lib\model\types\hk_datetime_field_attr.anubis" /> |
| 150 | + <Compile Include="hayamiki_lib\model\types\hk_foreign_key_active_filter.anubis" /> | ||
| 150 | <Compile Include="hayamiki_lib\model\types\hk_foreign_key_clause.anubis" /> | 151 | <Compile Include="hayamiki_lib\model\types\hk_foreign_key_clause.anubis" /> |
| 151 | <Compile Include="hayamiki_lib\model\types\hk_foreign_key_clause_on_directive.anubis" /> | 152 | <Compile Include="hayamiki_lib\model\types\hk_foreign_key_clause_on_directive.anubis" /> |
| 152 | <Compile Include="hayamiki_lib\model\types\hk_help_text.anubis" /> | 153 | <Compile Include="hayamiki_lib\model\types\hk_help_text.anubis" /> |
| @@ -163,9 +164,11 @@ | @@ -163,9 +164,11 @@ | ||
| 163 | <Compile Include="hayamiki_lib\model\types\hk_text_choice.anubis" /> | 164 | <Compile Include="hayamiki_lib\model\types\hk_text_choice.anubis" /> |
| 164 | <Compile Include="hayamiki_lib\model\types\hk_text_choices.anubis" /> | 165 | <Compile Include="hayamiki_lib\model\types\hk_text_choices.anubis" /> |
| 165 | <Compile Include="hayamiki_lib\model\types\hk_text_field_attr.anubis" /> | 166 | <Compile Include="hayamiki_lib\model\types\hk_text_field_attr.anubis" /> |
| 167 | + <Compile Include="hayamiki_lib\model\utils.anubis" /> | ||
| 166 | <Compile Include="hayamiki_lib\types\hayamiki.anubis" /> | 168 | <Compile Include="hayamiki_lib\types\hayamiki.anubis" /> |
| 167 | <Compile Include="hayamiki_lib\view\hk_filter.anubis" /> | 169 | <Compile Include="hayamiki_lib\view\hk_filter.anubis" /> |
| 168 | <Compile Include="hayamiki_lib\view\jqgrid.anubis" /> | 170 | <Compile Include="hayamiki_lib\view\jqgrid.anubis" /> |
| 171 | + <Compile Include="hayamiki_lib\view\load_vtm.anubis" /> | ||
| 169 | <Compile Include="hayamiki_lib\view\view_apps_renderer.anubis" /> | 172 | <Compile Include="hayamiki_lib\view\view_apps_renderer.anubis" /> |
| 170 | <Compile Include="hayamiki_lib\view\view_editor_renderer.anubis" /> | 173 | <Compile Include="hayamiki_lib\view\view_editor_renderer.anubis" /> |
| 171 | <Compile Include="hayamiki_lib\view\view_rows_import.anubis" /> | 174 | <Compile Include="hayamiki_lib\view\view_rows_import.anubis" /> |
| @@ -524,6 +527,7 @@ | @@ -524,6 +527,7 @@ | ||
| 524 | <Compile Include="library\xml\basic_xml_parser.anubis" /> | 527 | <Compile Include="library\xml\basic_xml_parser.anubis" /> |
| 525 | <Compile Include="library\xml\xml_parser.apg.anubis" /> | 528 | <Compile Include="library\xml\xml_parser.apg.anubis" /> |
| 526 | <Compile Include="src\check.anubis" /> | 529 | <Compile Include="src\check.anubis" /> |
| 530 | + <Compile Include="src\generation\anubis.anubis" /> | ||
| 527 | <Compile Include="src\generation\choices_selector.anubis" /> | 531 | <Compile Include="src\generation\choices_selector.anubis" /> |
| 528 | <Compile Include="src\generation\columns.anubis" /> | 532 | <Compile Include="src\generation\columns.anubis" /> |
| 529 | <Compile Include="src\generation\create_table.anubis" /> | 533 | <Compile Include="src\generation\create_table.anubis" /> |
hayamiki_lib @ c6bd97b105c
src/check.anubis
| @@ -42,7 +42,7 @@ define Maybe(HK_Model_Column) | @@ -42,7 +42,7 @@ define Maybe(HK_Model_Column) | ||
| 42 | HK_Model_Column col | 42 | HK_Model_Column col |
| 43 | )= | 43 | )= |
| 44 | since col is hk_column(name, type, attrib, help), | 44 | since col is hk_column(name, type, attrib, help), |
| 45 | - if type is foreign_key(fk_app, fk_table, fields, fk_clause) then | 45 | + if type is foreign_key(fk_app, fk_table, fields, active_filter, fk_clause) then |
| 46 | //TODO check for searchable fields if exists in foreign table | 46 | //TODO check for searchable fields if exists in foreign table |
| 47 | with mb_fk_app = if (fk_app) is | 47 | with mb_fk_app = if (fk_app) is |
| 48 | { | 48 | { |
| @@ -59,7 +59,7 @@ define Maybe(HK_Model_Column) | @@ -59,7 +59,7 @@ define Maybe(HK_Model_Column) | ||
| 59 | if mb_fk_app is | 59 | if mb_fk_app is |
| 60 | { | 60 | { |
| 61 | failure then failure, | 61 | failure then failure, |
| 62 | - success(n_fk_app) then success(hk_column(name, foreign_key(if (fk_app) is app_name(_) then app_name(n_fk_app) else fk_app, (if length(n_fk_app)>0 then n_fk_app+"_"else "")+fk_table, fields, fk_clause), attrib, help)) | 62 | + success(n_fk_app) then success(hk_column(name, foreign_key(if (fk_app) is app_name(_) then app_name(n_fk_app) else fk_app, (if length(n_fk_app)>0 then n_fk_app+"_"else "")+fk_table, fields, active_filter, fk_clause), attrib, help)) |
| 63 | } | 63 | } |
| 64 | else | 64 | else |
| 65 | success(col). | 65 | success(col). |
src/generation/columns.anubis
| @@ -156,7 +156,7 @@ public define Maybe(String) | @@ -156,7 +156,7 @@ public define Maybe(String) | ||
| 156 | auto_now_add then | 156 | auto_now_add then |
| 157 | if insert then success(name) else failure | 157 | if insert then success(name) else failure |
| 158 | }, | 158 | }, |
| 159 | - foreign_key(_,_,_,_) then success(name), | 159 | + foreign_key(_,_,_,_,_) then success(name), |
| 160 | integer_field(_) then success(name), | 160 | integer_field(_) then success(name), |
| 161 | float_field then success(name), | 161 | float_field then success(name), |
| 162 | char_field(_,_) then success(name), | 162 | char_field(_,_) then success(name), |
| @@ -251,12 +251,12 @@ public define Maybe(String) | @@ -251,12 +251,12 @@ public define Maybe(String) | ||
| 251 | auto_now then success("information(\""+to_upper(col_name)+"\", \""+col_name+"\", "+type_name+"."+col_name+".datetime, 18, "+to_Anubis_source(help)+")"), | 251 | auto_now then success("information(\""+to_upper(col_name)+"\", \""+col_name+"\", "+type_name+"."+col_name+".datetime, 18, "+to_Anubis_source(help)+")"), |
| 252 | auto_now_add then success("information(\""+to_upper(col_name)+"\", \""+col_name+"\", "+type_name+"."+col_name+".datetime, 18, "+to_Anubis_source(help)+")") | 252 | auto_now_add then success("information(\""+to_upper(col_name)+"\", \""+col_name+"\", "+type_name+"."+col_name+".datetime, 18, "+to_Anubis_source(help)+")") |
| 253 | }, | 253 | }, |
| 254 | - foreign_key(app,foreign_table,fields,_) then | 254 | + foreign_key(app,foreign_table,fields,active_filters,_) then |
| 255 | if length(fields) = 0 then | 255 | if length(fields) = 0 then |
| 256 | - success("foreign_text(\""+to_upper(col_name)+"\", \""+col_name+"\", "+type_name+"."+col_name+", \""+foreign_table+"\", hk_form_selector(get_selector_"+foreign_table+"), "+to_Anubis_source(help)+")") | 256 | + success("foreign_text(\""+to_upper(col_name)+"\", \""+col_name+"\", "+type_name+"."+col_name+", \""+foreign_table+"\", hk_form_selector(get_selector_"+foreign_table+"), "+to_Anubis_source(active_filters)+", "+to_Anubis_source(help)+")") |
| 257 | else | 257 | else |
| 258 | with search_fields = join(", ", map((String field) |-> "\""+field+"\"",fields)), | 258 | with search_fields = join(", ", map((String field) |-> "\""+field+"\"",fields)), |
| 259 | - success("foreign_text_search(\""+to_upper(col_name)+"\", \""+col_name+"\", "+type_name+"."+col_name+", \""+foreign_table+"\", ["+search_fields+"], "+to_Anubis_source(help)+")"), | 259 | + success("foreign_text_search(\""+to_upper(col_name)+"\", \""+col_name+"\", "+type_name+"."+col_name+", \""+foreign_table+"\", ["+search_fields+"], "+to_Anubis_source(active_filters)+", "+to_Anubis_source(help)+")"), |
| 260 | 260 | ||
| 261 | integer_field(choices) then | 261 | integer_field(choices) then |
| 262 | //success("integer(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+", "+to_Anubis_source(help)+")"), | 262 | //success("integer(\""+to_upper(name)+"\", \""+name+"\", "+type_name+"."+name+", "+to_Anubis_source(help)+")"), |
| @@ -334,7 +334,7 @@ public define String | @@ -334,7 +334,7 @@ public define String | ||
| 334 | date_field(attrs) then "to_String("+current_type_name+"."+name+")", | 334 | date_field(attrs) then "to_String("+current_type_name+"."+name+")", |
| 335 | time_field(attrs) then "to_String("+current_type_name+"."+name+")", | 335 | time_field(attrs) then "to_String("+current_type_name+"."+name+")", |
| 336 | datetime_field(attrs) then "to_String("+current_type_name+"."+name+")" | 336 | datetime_field(attrs) then "to_String("+current_type_name+"."+name+")" |
| 337 | - foreign_key(app,foreign_table,_,_) then "get_"+foreign_table+"_show_string(db, "+current_type_name+"."+name+")", | 337 | + foreign_key(app,foreign_table,_,_,_) then "get_"+foreign_table+"_show_string(db, "+current_type_name+"."+name+")", |
| 338 | integer_field(_) then "to_String("+current_type_name+"."+name+")", | 338 | integer_field(_) then "to_String("+current_type_name+"."+name+")", |
| 339 | float_field then "float_to_string("+current_type_name+"."+name+",5)", | 339 | float_field then "float_to_string("+current_type_name+"."+name+",5)", |
| 340 | char_field(_,_) then current_type_name+"."+name, | 340 | char_field(_,_) then current_type_name+"."+name, |
src/generation/extractor.anubis
| @@ -25,7 +25,7 @@ public define String | @@ -25,7 +25,7 @@ public define String | ||
| 25 | date_field(_) then "db_date(text"+cursor_index+")", | 25 | date_field(_) then "db_date(text"+cursor_index+")", |
| 26 | time_field(_) then "db_time(text"+cursor_index+")", | 26 | time_field(_) then "db_time(text"+cursor_index+")", |
| 27 | datetime_field(_) then "db_datetime(text"+cursor_index+")", | 27 | datetime_field(_) then "db_datetime(text"+cursor_index+")", |
| 28 | - foreign_key(_,_,_,_) then "db_id((Int)db_integer"+cursor_index+")", | 28 | + foreign_key(_,_,_,_,_) then "db_id((Int)db_integer"+cursor_index+")", |
| 29 | integer_field(_) then "(Int)db_integer"+cursor_index, | 29 | integer_field(_) then "(Int)db_integer"+cursor_index, |
| 30 | float_field then "db_float"+cursor_index, | 30 | float_field then "db_float"+cursor_index, |
| 31 | char_field(_,_) then "text"+cursor_index, | 31 | char_field(_,_) then "text"+cursor_index, |
src/generation/fields.anubis
| @@ -30,7 +30,7 @@ public define String | @@ -30,7 +30,7 @@ public define String | ||
| 30 | date_field(_) then "DB_date", | 30 | date_field(_) then "DB_date", |
| 31 | time_field(_) then "DB_time", | 31 | time_field(_) then "DB_time", |
| 32 | datetime_field(_) then "DB_datetime", | 32 | datetime_field(_) then "DB_datetime", |
| 33 | - foreign_key(_,_,_,_) then "DB_id", | 33 | + foreign_key(_,_,_,_,_) then "DB_id", |
| 34 | integer_field(_) then "Int", | 34 | integer_field(_) then "Int", |
| 35 | float_field then "Float", | 35 | float_field then "Float", |
| 36 | char_field(_,_) then "String", | 36 | char_field(_,_) then "String", |
| @@ -56,7 +56,7 @@ public define String | @@ -56,7 +56,7 @@ public define String | ||
| 56 | date_field(_) then "extern_type(\"DB_date\", \"calexium_lib/database/db_types.anubis\")", | 56 | date_field(_) then "extern_type(\"DB_date\", \"calexium_lib/database/db_types.anubis\")", |
| 57 | time_field(_) then "extern_type(\"DB_time\", \"calexium_lib/database/db_types.anubis\")", | 57 | time_field(_) then "extern_type(\"DB_time\", \"calexium_lib/database/db_types.anubis\")", |
| 58 | datetime_field(_) then "extern_type(\"DB_datetime\", \"calexium_lib/database/db_types.anubis\")", | 58 | datetime_field(_) then "extern_type(\"DB_datetime\", \"calexium_lib/database/db_types.anubis\")", |
| 59 | - foreign_key(_,_,_,_) then "extern_type(\"DB_id\", \"calexium_lib/database/db_types.anubis\")", | 59 | + foreign_key(_,_,_,_,_) then "extern_type(\"DB_id\", \"calexium_lib/database/db_types.anubis\")", |
| 60 | integer_field(_) then "int", | 60 | integer_field(_) then "int", |
| 61 | float_field then "float", | 61 | float_field then "float", |
| 62 | char_field(_,_) then "string", | 62 | char_field(_,_) then "string", |
| @@ -89,7 +89,7 @@ public define String | @@ -89,7 +89,7 @@ public define String | ||
| 89 | datetime_field(dt_attrs) then | 89 | datetime_field(dt_attrs) then |
| 90 | with new_attributes = if dt_attrs is auto_now_add then [default("(datetime('now', 'LOCALTIME'))")] else attributes, | 90 | with new_attributes = if dt_attrs is auto_now_add then [default("(datetime('now', 'LOCALTIME'))")] else attributes, |
| 91 | fill("DATETIME", 15) + format_attributes(new_attributes), | 91 | fill("DATETIME", 15) + format_attributes(new_attributes), |
| 92 | - foreign_key(app,fk,_,fk_clause) then fill("INTEGER", 15) + format_attributes(attributes)+" REFERENCES "+fk+"(id) "+format_fk_clause(fk_clause), | 92 | + foreign_key(app,fk,_,_,fk_clause) then fill("INTEGER", 15) + format_attributes(attributes)+" REFERENCES "+fk+"(id) "+format_fk_clause(fk_clause), |
| 93 | integer_field(_) then fill("INTEGER", 15) + format_attributes(attributes), | 93 | integer_field(_) then fill("INTEGER", 15) + format_attributes(attributes), |
| 94 | float_field then fill("DOUBLE", 15) + format_attributes(attributes), | 94 | float_field then fill("DOUBLE", 15) + format_attributes(attributes), |
| 95 | char_field(_,size) then fill("VARCHAR("+size+")", 15) + format_attributes(attributes), | 95 | char_field(_,size) then fill("VARCHAR("+size+")", 15) + format_attributes(attributes), |
| @@ -116,7 +116,7 @@ public define String | @@ -116,7 +116,7 @@ public define String | ||
| 116 | date_field(_) then "db_date(\"\")", | 116 | date_field(_) then "db_date(\"\")", |
| 117 | time_field(_) then "db_time(\"\")", | 117 | time_field(_) then "db_time(\"\")", |
| 118 | datetime_field(_) then "db_datetime(\"\")", | 118 | datetime_field(_) then "db_datetime(\"\")", |
| 119 | - foreign_key(_,_,_,_) then "(DB_id)none", | 119 | + foreign_key(_,_,_,_,_) then "(DB_id)none", |
| 120 | integer_field(_) then "(Int)0", | 120 | integer_field(_) then "(Int)0", |
| 121 | float_field then "(Float)0.0", | 121 | float_field then "(Float)0.0", |
| 122 | char_field(choices,size) then "\"\"", | 122 | char_field(choices,size) then "\"\"", |
| @@ -161,7 +161,7 @@ public define String | @@ -161,7 +161,7 @@ public define String | ||
| 161 | else | 161 | else |
| 162 | "" | 162 | "" |
| 163 | }, | 163 | }, |
| 164 | - foreign_key(_,_,_,_) then "bind_DB_id_or_NULL(\":v_"+name+"\", "+type_name+"."+name+")", | 164 | + foreign_key(_,_,_,_,_) then "bind_DB_id_or_NULL(\":v_"+name+"\", "+type_name+"."+name+")", |
| 165 | integer_field(_) then "bind_Int(\":v_"+name+"\", "+type_name+"."+name+")", | 165 | integer_field(_) then "bind_Int(\":v_"+name+"\", "+type_name+"."+name+")", |
| 166 | float_field then "bind_Float(\":v_"+name+"\", "+type_name+"."+name+")", | 166 | float_field then "bind_Float(\":v_"+name+"\", "+type_name+"."+name+")", |
| 167 | char_field(_,_) then "bind_String"+or_null+"(\":v_"+name+"\", "+type_name+"."+name+")", | 167 | char_field(_,_) then "bind_String"+or_null+"(\":v_"+name+"\", "+type_name+"."+name+")", |
src/generation/header.anubis
| @@ -22,7 +22,7 @@ define Maybe(One) | @@ -22,7 +22,7 @@ define Maybe(One) | ||
| 22 | [] then success(unique), | 22 | [] then success(unique), |
| 23 | [h . t] then | 23 | [h . t] then |
| 24 | since h is hk_column(_, type, _, _), | 24 | since h is hk_column(_, type, _, _), |
| 25 | - if type is foreign_key(app, table_name, _, _) then | 25 | + if type is foreign_key(app, table_name, _, _, _) then |
| 26 | if write_string(stream, "\nread database/generated/"+table_name+".anubis") is | 26 | if write_string(stream, "\nread database/generated/"+table_name+".anubis") is |
| 27 | { | 27 | { |
| 28 | failure then failure, | 28 | failure then failure, |
src/generation/html.anubis
| @@ -98,7 +98,7 @@ public define String | @@ -98,7 +98,7 @@ public define String | ||
| 98 | date_field(attrs) then to_HTML_cell_text(column, data_name, general_type_name), | 98 | date_field(attrs) then to_HTML_cell_text(column, data_name, general_type_name), |
| 99 | time_field(attrs) then to_HTML_cell_text(column, data_name, general_type_name), | 99 | time_field(attrs) then to_HTML_cell_text(column, data_name, general_type_name), |
| 100 | datetime_field(attrs) then to_HTML_cell_text(column, data_name, general_type_name), | 100 | datetime_field(attrs) then to_HTML_cell_text(column, data_name, general_type_name), |
| 101 | - foreign_key(app, foreign_table,_,_) then to_HTML_cell_text(column, data_name, general_type_name), | 101 | + foreign_key(app, foreign_table,_,_,_) then to_HTML_cell_text(column, data_name, general_type_name), |
| 102 | integer_field(choices) then to_HTML_cell_text(column, data_name, general_type_name), | 102 | integer_field(choices) then to_HTML_cell_text(column, data_name, general_type_name), |
| 103 | float_field then to_HTML_cell_text(column, data_name, general_type_name), | 103 | float_field then to_HTML_cell_text(column, data_name, general_type_name), |
| 104 | char_field(choices, size) then to_HTML_cell_text(column, data_name, general_type_name), | 104 | char_field(choices, size) then to_HTML_cell_text(column, data_name, general_type_name), |
src/generation/icons.anubis
| @@ -28,7 +28,7 @@ public define String | @@ -28,7 +28,7 @@ public define String | ||
| 28 | date_field(attrs) then icn16_clock, | 28 | date_field(attrs) then icn16_clock, |
| 29 | time_field(attrs) then icn16_clock, | 29 | time_field(attrs) then icn16_clock, |
| 30 | datetime_field(attrs) then icn16_clock, | 30 | datetime_field(attrs) then icn16_clock, |
| 31 | - foreign_key(app,foreign_table,_,_) then icn16_question, | 31 | + foreign_key(app,foreign_table,_,_,_) then icn16_question, |
| 32 | integer_field(choice) then icn16_question, | 32 | integer_field(choice) then icn16_question, |
| 33 | float_field then icn16_question, | 33 | float_field then icn16_question, |
| 34 | char_field(choice, size) then icn16_question, | 34 | char_field(choice, size) then icn16_question, |
src/generation/json.anubis
| @@ -28,7 +28,7 @@ public define String | @@ -28,7 +28,7 @@ public define String | ||
| 28 | date_field(attrs) then "to_JSON_String(to_String("+current_type_name+"."+name+"))", | 28 | date_field(attrs) then "to_JSON_String(to_String("+current_type_name+"."+name+"))", |
| 29 | time_field(attrs) then "to_JSON_String(to_String("+current_type_name+"."+name+"))", | 29 | time_field(attrs) then "to_JSON_String(to_String("+current_type_name+"."+name+"))", |
| 30 | datetime_field(attrs) then "to_JSON_String(to_String("+current_type_name+"."+name+"))", | 30 | datetime_field(attrs) then "to_JSON_String(to_String("+current_type_name+"."+name+"))", |
| 31 | - foreign_key(app,foreign_table,_,_) then "to_JSON_String(get_"+foreign_table+"_show_string(db, "+current_type_name+"."+name+"))", | 31 | + foreign_key(app,foreign_table,_,_,_) then "to_JSON_String(get_"+foreign_table+"_show_string(db, "+current_type_name+"."+name+"))", |
| 32 | integer_field(_) then current_type_name+"."+name, | 32 | integer_field(_) then current_type_name+"."+name, |
| 33 | float_field then "float_to_string("+current_type_name+"."+name+",5)", | 33 | float_field then "float_to_string("+current_type_name+"."+name+",5)", |
| 34 | char_field(_,_) then "to_JSON_String("+current_type_name+"."+name+")", | 34 | char_field(_,_) then "to_JSON_String("+current_type_name+"."+name+")", |
| @@ -62,7 +62,7 @@ public define String | @@ -62,7 +62,7 @@ public define String | ||
| 62 | date_field(attrs) then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))", | 62 | date_field(attrs) then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))", |
| 63 | time_field(attrs) then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))", | 63 | time_field(attrs) then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))", |
| 64 | datetime_field(attrs) then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))", | 64 | datetime_field(attrs) then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))", |
| 65 | - foreign_key(app,foreign_table,_,_) then "json_member(\""+name+"\", if resolve_fk then json_string(get_"+foreign_table+"_show_string(db, "+current_type_name+"."+name+"))) else json_int("+current_type_name+"."+name+")", | 65 | + foreign_key(app,foreign_table,_,_,_) then "json_member(\""+name+"\", if resolve_fk then json_string(get_"+foreign_table+"_show_string(db, "+current_type_name+"."+name+"))) else json_int("+current_type_name+"."+name+")", |
| 66 | integer_field(_) then "json_member(\""+name+"\", json_int("+current_type_name+"."+name+"))", | 66 | integer_field(_) then "json_member(\""+name+"\", json_int("+current_type_name+"."+name+"))", |
| 67 | float_field then "json_member(\""+name+"\", json_float("+current_type_name+"."+name+",5))", | 67 | float_field then "json_member(\""+name+"\", json_float("+current_type_name+"."+name+",5))", |
| 68 | char_field(_,_) then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))", | 68 | char_field(_,_) then "json_member(\""+name+"\", json_string("+current_type_name+"."+name+"))", |
| @@ -92,7 +92,7 @@ public define String | @@ -92,7 +92,7 @@ public define String | ||
| 92 | date_field(_) then "json_member(\""+name+"\", json_string(text"+cursor_index+"))", | 92 | date_field(_) then "json_member(\""+name+"\", json_string(text"+cursor_index+"))", |
| 93 | time_field(_) then "json_member(\""+name+"\", json_string(text"+cursor_index+"))", | 93 | time_field(_) then "json_member(\""+name+"\", json_string(text"+cursor_index+"))", |
| 94 | datetime_field(_) then "json_member(\""+name+"\", json_string(text"+cursor_index+"))", | 94 | datetime_field(_) then "json_member(\""+name+"\", json_string(text"+cursor_index+"))", |
| 95 | - foreign_key(app,foreign_table,_,_) then | 95 | + foreign_key(app,foreign_table,_,_,_) then |
| 96 | " if resolve_fk then\n"+ | 96 | " if resolve_fk then\n"+ |
| 97 | " json_member(\""+name+"\", json_string(get_"+foreign_table+"_show_string(db, db_id((Int)db_integer"+cursor_index+"))))\n"+ | 97 | " json_member(\""+name+"\", json_string(get_"+foreign_table+"_show_string(db, db_id((Int)db_integer"+cursor_index+"))))\n"+ |
| 98 | " else\n"+ | 98 | " else\n"+ |
src/generation/vt_view.anubis
| @@ -49,7 +49,7 @@ define String | @@ -49,7 +49,7 @@ define String | ||
| 49 | date_field(attrs) then "date(\""+to_upper(name)+"\", \""+name+"\", "+to_Anubis_source(help)+")", | 49 | date_field(attrs) then "date(\""+to_upper(name)+"\", \""+name+"\", "+to_Anubis_source(help)+")", |
| 50 | time_field(attrs) then "time(\""+to_upper(name)+"\", \""+name+"\", "+to_Anubis_source(help)+")", | 50 | time_field(attrs) then "time(\""+to_upper(name)+"\", \""+name+"\", "+to_Anubis_source(help)+")", |
| 51 | datetime_field(attrs) then "datetime(\""+to_upper(name)+"\", \""+name+"\", "+to_Anubis_source(help)+")", | 51 | datetime_field(attrs) then "datetime(\""+to_upper(name)+"\", \""+name+"\", "+to_Anubis_source(help)+")", |
| 52 | - foreign_key(app,foreign_table,_,_) then "foreign_text(\""+to_upper(name)+"\", \""+name+"\", hk_form_selector(get_selector_"+foreign_table+"), "+to_Anubis_source(help)+")", | 52 | + foreign_key(app,foreign_table,_,active_filters,_) then "foreign_text(\""+to_upper(name)+"\", \""+name+"\", hk_form_selector(get_selector_"+foreign_table+"), "+to_Anubis_source(help)+")", |
| 53 | integer_field(choices) then | 53 | integer_field(choices) then |
| 54 | if choices is | 54 | if choices is |
| 55 | { | 55 | { |
src/generation/web_args.anubis
| @@ -26,7 +26,7 @@ public define String | @@ -26,7 +26,7 @@ public define String | ||
| 26 | date_field(attrs) then if attrs = none then "get_DB_date(lwa, __prefix__+\""+name+"\")" else "with "+name+" = get_dummy_DB_date,", | 26 | date_field(attrs) then if attrs = none then "get_DB_date(lwa, __prefix__+\""+name+"\")" else "with "+name+" = get_dummy_DB_date,", |
| 27 | time_field(attrs) then if attrs = none then "get_DB_time(lwa, __prefix__+\""+name+"\")" else "with "+name+" = get_dummy_DB_time,", | 27 | time_field(attrs) then if attrs = none then "get_DB_time(lwa, __prefix__+\""+name+"\")" else "with "+name+" = get_dummy_DB_time,", |
| 28 | datetime_field(attrs) then if attrs = none then "get_DB_datetime(lwa, __prefix__+\""+name+"\")" else "with "+name+" = get_dummy_DB_datetime,", | 28 | datetime_field(attrs) then if attrs = none then "get_DB_datetime(lwa, __prefix__+\""+name+"\")" else "with "+name+" = get_dummy_DB_datetime,", |
| 29 | - foreign_key(_,_,_,_) then "with "+name+" = get_DB_id(lwa, __prefix__+\""+name+"\"),", | 29 | + foreign_key(_,_,_,_,_) then "with "+name+" = get_DB_id(lwa, __prefix__+\""+name+"\"),", |
| 30 | integer_field(_) then "get_Int(lwa, __prefix__+\""+name+"\")", | 30 | integer_field(_) then "get_Int(lwa, __prefix__+\""+name+"\")", |
| 31 | float_field then "get_Float(lwa, __prefix__+\""+name+"\")", | 31 | float_field then "get_Float(lwa, __prefix__+\""+name+"\")", |
| 32 | char_field(_,_) then "get_String(lwa, __prefix__+\""+name+"\")", | 32 | char_field(_,_) then "get_String(lwa, __prefix__+\""+name+"\")", |
| @@ -81,7 +81,7 @@ public define String | @@ -81,7 +81,7 @@ public define String | ||
| 81 | date_field(attrs) then if attrs = none then "get_DB_date(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+")," else "get_dummy_DB_date,", | 81 | date_field(attrs) then if attrs = none then "get_DB_date(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+")," else "get_dummy_DB_date,", |
| 82 | time_field(attrs) then if attrs = none then "get_DB_time(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+")," else "get_dummy_DB_time,", | 82 | time_field(attrs) then if attrs = none then "get_DB_time(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+")," else "get_dummy_DB_time,", |
| 83 | datetime_field(attrs) then if attrs = none then "get_DB_datetime(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+")," else "get_dummy_DB_datetime,", | 83 | datetime_field(attrs) then if attrs = none then "get_DB_datetime(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+")," else "get_dummy_DB_datetime,", |
| 84 | - foreign_key(_,_,_,_) then "get_DB_id(lwa, __prefix__+\""+name+"\"),", | 84 | + foreign_key(_,_,_,_,_) then "get_DB_id(lwa, __prefix__+\""+name+"\"),", |
| 85 | integer_field(_) then "get_Int(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+"),", | 85 | integer_field(_) then "get_Int(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+"),", |
| 86 | float_field then "get_Float(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+"),", | 86 | float_field then "get_Float(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+"),", |
| 87 | char_field(_,_) then "get_String(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+"),", | 87 | char_field(_,_) then "get_String(lwa, __prefix__+\""+name+"\", "+to_Anubis_default(col_type)+"),", |
| @@ -195,7 +195,7 @@ public define String | @@ -195,7 +195,7 @@ public define String | ||
| 195 | auto_now then "[field(\""+name+"\", bind_Datetime(\":v_"+name+"\", db_now))]", | 195 | auto_now then "[field(\""+name+"\", bind_Datetime(\":v_"+name+"\", db_now))]", |
| 196 | auto_now_add then "[]" | 196 | auto_now_add then "[]" |
| 197 | }, | 197 | }, |
| 198 | - foreign_key(_,_,_,_) then //"with "+name+" = get_DB_id(lwa, __prefix__+\""+name+"\"),", | 198 | + foreign_key(_,_,_,_,_) then //"with "+name+" = get_DB_id(lwa, __prefix__+\""+name+"\"),", |
| 199 | "if get_mb_DB_id(lwa, __prefix__+\""+name+"\") is {failure then [], success("+name+") then [field(\""+name+"\", bind_DB_id_or_NULL(\":v_"+name+"\", "+name+"))] }" | 199 | "if get_mb_DB_id(lwa, __prefix__+\""+name+"\") is {failure then [], success("+name+") then [field(\""+name+"\", bind_DB_id_or_NULL(\":v_"+name+"\", "+name+"))] }" |
| 200 | integer_field(_) then //"get_Int(lwa, __prefix__+\""+name+"\")", | 200 | integer_field(_) then //"get_Int(lwa, __prefix__+\""+name+"\")", |
| 201 | "if get_Int(lwa, __prefix__+\""+name+"\") is {failure then [], success("+name+") then [field(\""+name+"\", bind_Int(\":v_"+name+"\", "+name+"))] }" | 201 | "if get_Int(lwa, __prefix__+\""+name+"\") is {failure then [], success("+name+") then [field(\""+name+"\", bind_Int(\":v_"+name+"\", "+name+"))] }" |
src/main.anubis
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | * | 3 | * |
| 4 | * *Title* Interfacing, generating and controling a database with Anubis | 4 | * *Title* Interfacing, generating and controling a database with Anubis |
| 5 | * | 5 | * |
| 6 | - * *Copyright* Copyright © David René 2015-2017. | 6 | + * *Copyright* Copyright © David René 2015-2019. |
| 7 | * | 7 | * |
| 8 | * | 8 | * |
| 9 | * | 9 | * |
src/model.3.0.0.anubis
| @@ -121,7 +121,7 @@ public define HK_Table production_production_table = | @@ -121,7 +121,7 @@ public define HK_Table production_production_table = | ||
| 121 | [ | 121 | [ |
| 122 | 122 | ||
| 123 | hk_column("date", date_field(none), []), | 123 | hk_column("date", date_field(none), []), |
| 124 | - hk_column("assembler_id", foreign_key(app_name("staff"),"staff", [], []), []), | 124 | + hk_column("assembler_id", foreign_key(app_name("staff"),"staff"), []), |
| 125 | hk_column("type_ref_id", foreign_key("type_number"), []), | 125 | hk_column("type_ref_id", foreign_key("type_number"), []), |
| 126 | hk_column("product_ref_id", foreign_key("product_reference"), []), | 126 | hk_column("product_ref_id", foreign_key("product_reference"), []), |
| 127 | hk_column("site_id", foreign_key("production_site"), []), | 127 | hk_column("site_id", foreign_key("production_site"), []), |