mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v3.1.1.1
This commit is contained in:
@@ -46,9 +46,17 @@ public class Xoud_cfg_mgr {
|
||||
else
|
||||
return Bry_.new_u8(rv);
|
||||
}
|
||||
public void Update_bry(String key, byte[] val) {Update_bry("", key, val);}
|
||||
public void Update_bry(String grp, String key, byte[] val) {tbl.Update_bry(grp, key, val);}
|
||||
public void Insert_bry(String key, byte[] val) {Insert_bry("", key, val);}
|
||||
public void Upsert_int(String grp, String key, int val) {
|
||||
int exists = Select_int_or(grp, key, Int_.Min_value);
|
||||
if (exists == Int_.Min_value)
|
||||
Insert_int(grp, key, val);
|
||||
else
|
||||
Update_int(grp, key, val);
|
||||
}
|
||||
public void Update_bry(String key, byte[] val) {Update_bry("", key, val);}
|
||||
public void Update_bry(String grp, String key, byte[] val) {tbl.Update_bry(grp, key, val);}
|
||||
public void Update_int(String grp, String key, int val) {tbl.Update_int(grp, key, val);}
|
||||
public void Insert_bry(String key, byte[] val) {Insert_bry("", key, val);}
|
||||
public void Insert_bry(String grp, String key, byte[] val) {tbl.Insert_bry(grp, key, val);}
|
||||
public void Insert_int(String grp, String key, int val) {tbl.Insert_int(grp, key, val);}
|
||||
public int Next_id(String tbl_name) {
|
||||
|
||||
@@ -20,7 +20,7 @@ public class Xoud_id_mgr {
|
||||
private Xoud_cfg_mgr cfg_mgr;
|
||||
public Xoud_id_mgr(Xoud_cfg_mgr cfg_mgr) {this.cfg_mgr = cfg_mgr;}
|
||||
public int Get_next(String key) {return cfg_mgr.Select_int_or(Grp_key, key, 1);}
|
||||
public void Set_next(String key, int v) {cfg_mgr.Insert_int(Grp_key, key, v);}
|
||||
public void Set_next(String key, int v) {cfg_mgr.Upsert_int(Grp_key, key, v);}
|
||||
public int Get_next_and_save(String key) {
|
||||
int rv = Get_next(key);
|
||||
Set_next(key, rv + 1);
|
||||
|
||||
Reference in New Issue
Block a user