mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.3.4.1'
This commit is contained in:
@@ -29,7 +29,7 @@ public class Fsm_atr_tbl {
|
||||
this.fld_uid = flds.Add_int_pkey (fld_prefix + "uid");
|
||||
this.fld_url = flds.Add_str (fld_prefix + "url", 255);
|
||||
}
|
||||
public void Create_tbl() {conn.Ddl_create_tbl(Dbmeta_tbl_itm.New(tbl_name, flds));}
|
||||
public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));}
|
||||
public Fsm_atr_fil Select_1st_or_fail(Fsm_mnt_itm mnt_itm, Fsdb_db_mgr core_mgr, int mnt_id, boolean schema_thm_page) {
|
||||
Db_rdr rdr = conn.Stmt_select(tbl_name, flds, Dbmeta_fld_itm.Str_ary_empty).Exec_select__rls_auto();
|
||||
boolean schema_is_1 = core_mgr.File__schema_is_1();
|
||||
@@ -47,7 +47,7 @@ public class Fsm_atr_tbl {
|
||||
}
|
||||
}
|
||||
finally {rdr.Rls();}
|
||||
throw Err_.new_wo_type("missing atr db", "conn", conn.Conn_info().Xto_api());
|
||||
throw Err_.new_wo_type("missing atr db", "conn", conn.Conn_info().Db_api());
|
||||
}
|
||||
public void Insert(int id, String url_rel) {
|
||||
conn.Stmt_insert(tbl_name, flds).Val_int(fld_uid, id).Val_str(fld_url, url_rel).Exec_insert();
|
||||
|
||||
@@ -37,7 +37,7 @@ public class Fsm_bin_tbl {
|
||||
fld_bin_max = Dbmeta_fld_itm.Key_null;
|
||||
}
|
||||
}
|
||||
public void Create_tbl() {conn.Ddl_create_tbl(Dbmeta_tbl_itm.New(tbl_name, flds));}
|
||||
public void Create_tbl() {conn.Meta_tbl_create(Dbmeta_tbl_itm.New(tbl_name, flds));}
|
||||
public void Insert(int id, String url_rel) {
|
||||
conn.Stmt_insert(tbl_name, flds).Crt_int(fld_uid, id).Val_str(fld_url, url_rel).Val_long(fld_bin_len, 0).Val_long(fld_bin_max, 0).Exec_insert();
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public class Fsm_cfg_mgr {
|
||||
}
|
||||
public void Ctor_by_load() {
|
||||
Db_cfg_hash hash = Grps_get_or_load(Grp_core);
|
||||
this.next_id = hash.Get_by(Key_next_id).To_int_or(-1); if (next_id == -1) throw Err_.new_wo_type("next_id not found in cfg", "url", tbl.Conn().Conn_info().Xto_api());
|
||||
this.next_id = hash.Get_by(Key_next_id).To_int_or(-1); if (next_id == -1) throw Err_.new_wo_type("next_id not found in cfg", "url", tbl.Conn().Conn_info().Db_api());
|
||||
this.schema_thm_page = hash.Get_by(Key_schema_thm_page).To_yn_or_n();
|
||||
this.patch__next_id = hash.Get_by(Key_patch__next_id).To_yn_or_n();
|
||||
this.patch__page_gt_1 = hash.Get_by(Key_patch__page_gt_1).To_yn_or_n();
|
||||
|
||||
@@ -65,8 +65,8 @@ class Fsm_mnt_itm_ {
|
||||
Fsm_cfg_mgr cfg_mgr = abc_mgr.Cfg_mgr();
|
||||
int last_id = -1;
|
||||
Fsm_atr_fil atr_fil = atr_mgr.Db__core();
|
||||
int max_fil_id = Db_conn_.Select_fld0_as_int_or(atr_fil.Conn(), "SELECT Max(fil_id) AS MaxId FROM fsdb_fil;", -1);
|
||||
int max_thm_id = Db_conn_.Select_fld0_as_int_or(atr_fil.Conn(), "SELECT Max(thm_id) AS MaxId FROM fsdb_xtn_thm;", -1);
|
||||
int max_fil_id = atr_fil.Conn().Exec_select_as_int("SELECT Max(fil_id) AS MaxId FROM fsdb_fil;", -1);
|
||||
int max_thm_id = atr_fil.Conn().Exec_select_as_int("SELECT Max(thm_id) AS MaxId FROM fsdb_xtn_thm;", -1);
|
||||
last_id = max_fil_id > max_thm_id ? max_fil_id : max_thm_id;
|
||||
cfg_mgr.Patch_next_id_exec(last_id);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class Fsm_mnt_tbl implements Rls_able {
|
||||
}
|
||||
public void Create_tbl() {
|
||||
Dbmeta_tbl_itm meta = Dbmeta_tbl_itm.New(tbl_name, flds);
|
||||
conn.Ddl_create_tbl(meta);
|
||||
conn.Meta_tbl_create(meta);
|
||||
this.Insert(Fsm_mnt_mgr.Mnt_idx_main, Mnt_name_main, Mnt_name_main);
|
||||
this.Insert(Fsm_mnt_mgr.Mnt_idx_user, Mnt_name_user, Mnt_name_user);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user