diff --git a/controller/hk_rows_import.anubis b/controller/hk_rows_import.anubis index 047559a..6b744ca 100644 --- a/controller/hk_rows_import.anubis +++ b/controller/hk_rows_import.anubis @@ -344,7 +344,7 @@ public define Result(String, String) //file //csv_sep //col_x = 'target_col', where x is the column number in csv file and target_col is name of the column in the table - //with _T = make_translate_function(_session.language), + //with _T = make_translate_function(_session), with lwa = *_session.web_request.lwa, with separator = get_String(lwa, "csv_sep", ";"), with csv_db_columns = get_columns_list(lwa), diff --git a/controller/hk_utils.anubis b/controller/hk_utils.anubis new file mode 100644 index 0000000..a054290 --- /dev/null +++ b/controller/hk_utils.anubis @@ -0,0 +1,39 @@ +/* + * Created by PyramIDE. + * User: フランスのトトロ aka (David RENÉ) + * Date: 19/04/2020 + * Time: 18:35 + * © David RENÉ + */ + +read xlib/web/CXM_web_arg_utils.anubis + +read hayamiki_lib/view/view_table_manager_types.anubis +read hayamiki_lib/types/hayamiki.anubis + +public define Maybe(Int) + update_row + ( + SQLite3DataBase db, + VTM _vtm, + List(Web_arg) _lwa + )= + + with table_name = get_String(_lwa, "table_name", ""), // table name + + if get_hk_controller(_vtm.hk_controllers, table_name) is + { + failure then println("can't get writer for "+table_name);failure, + success(controller) then + //forget(map((HK_Trigger trigger) |-> println("call trigger before update "+trigger.trigger_name+" ON table "+table_name); trigger.trigger_call_back(db, _session), *controller.triggers.before_update)); + + if controller.write_from_fields(db, _lwa) is + { + failure then failure, + success(inserted_idx) then + //replace_Int(_session.fields, "hk_last_insert_idx", inserted_idx); + //forget(map((HK_Trigger trigger) |-> println("call trigger after update "+trigger.trigger_name+" ON table "+table_name); trigger.trigger_call_back(db, _session), *controller.triggers.after_update)); + success(inserted_idx) + } + } +. diff --git a/model/load_dbm.anubis b/model/load_dbm.anubis index 597dc81..49de99a 100644 --- a/model/load_dbm.anubis +++ b/model/load_dbm.anubis @@ -36,6 +36,7 @@ public define List(Migration) String app_name ) = + println("all_migrations files from "+app_dbm_path+" application "+app_name); with files = directory_list(app_dbm_path, app_name+"_dbm_to_v*.adm"), all_list = map_select((String file_name) |-> load_dbm(app_dbm_path+file_name), files), merge_sort(all_list, migration_less) diff --git a/model/utils.anubis b/model/utils.anubis index 7c33257..23336ef 100644 --- a/model/utils.anubis +++ b/model/utils.anubis @@ -76,4 +76,3 @@ public define List((String, String)) ) ] . - -- libgit2 0.21.4