mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.8.3.1
This commit is contained in:
@@ -44,6 +44,8 @@ public class Fsdb_db_mgr_ {
|
||||
if (!Db_conn_bldr.I.Exists(main_core_url)) return null;
|
||||
usr_dlg.Log_many("", "", "fsdb.db_core.v2: type=~{0} url=~{1}", layout.Name(), main_core_url.Raw());
|
||||
Db_conn main_core_conn = Db_conn_bldr.I.Get(main_core_url);
|
||||
if (wiki.Data__core_mgr().Props().Layout_file().Tid_is_all())
|
||||
return new Fsdb_db_mgr__v2(Fsdb_db_mgr__v2.Cfg__layout_file__get(main_core_conn), wiki_dir, new Fsdb_db_file(main_core_url, main_core_conn), new Fsdb_db_file(main_core_url, main_core_conn));
|
||||
Io_url user_core_url = wiki_dir.GenSubFil(Fsdb_db_mgr__v2_bldr.Make_user_name(domain_str));
|
||||
if (!Db_conn_bldr.I.Exists(user_core_url)) // if user file does not exist, create it; needed b/c offline packages don't include file; DATE:2015-04-19
|
||||
Fsdb_db_mgr__v2_bldr.I.Make_core_file_user(wiki, user_core_url, user_core_url.NameAndExt(), main_core_url.NameAndExt());
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Fsdb_db_mgr__v2_bldr {
|
||||
private Fsdb_db_file Load_core_file(Io_url url) {return new Fsdb_db_file(url, Db_conn_bldr.I.Get(url));}
|
||||
private Fsdb_db_file Make_core_file_main(Xow_wiki wiki, Io_url main_core_url, String main_core_name, Xowd_db_layout layout) {
|
||||
Db_conn conn = layout.Tid_is_all() ? Db_conn_bldr.I.Get(main_core_url) : Db_conn_bldr.I.New(main_core_url); // if all, use existing (assumes same file name); else, create new
|
||||
conn.Txn_bgn();
|
||||
conn.Txn_bgn("fsdb__core_file");
|
||||
Fsdb_db_file rv = Make_core_file(main_core_url, conn, schema_is_1, Fsm_mnt_mgr.Mnt_idx_main);
|
||||
if (!layout.Tid_is_all()) // do not make cfg data if all
|
||||
Make_cfg_data(wiki, main_core_name, rv, Main_core_tid(layout), -1);
|
||||
@@ -50,7 +50,7 @@ public class Fsdb_db_mgr__v2_bldr {
|
||||
}
|
||||
public Fsdb_db_file Make_core_file_user(Xow_wiki wiki, Io_url user_core_url, String user_file_name, String main_core_name) { // always create file; do not create mnt_tbl;
|
||||
Db_conn conn = Db_conn_bldr.I.New(user_core_url);
|
||||
conn.Txn_bgn();
|
||||
conn.Txn_bgn("fsdb__core_user");
|
||||
Fsdb_db_file rv = Make_core_file(user_core_url, conn, schema_is_1, Fsm_mnt_mgr.Mnt_idx_user);
|
||||
Fsm_bin_tbl dbb_tbl = new Fsm_bin_tbl(conn, schema_is_1, Fsm_mnt_mgr.Mnt_idx_user); dbb_tbl.Insert(0, user_file_name);
|
||||
Make_bin_tbl(rv);
|
||||
|
||||
@@ -38,7 +38,7 @@ public class Fsd_bin_tbl implements RlsAble {
|
||||
stmt_select = Db_stmt_.Rls(stmt_select);
|
||||
}
|
||||
public void Create_tbl() {conn.Ddl_create_tbl(Db_meta_tbl.new_(tbl_name, flds));}
|
||||
public void Insert_bgn() {conn.Txn_bgn(); stmt_insert = conn.Stmt_insert(tbl_name, flds);}
|
||||
public void Insert_bgn() {conn.Txn_bgn("fsdb_bin__insert"); stmt_insert = conn.Stmt_insert(tbl_name, flds);}
|
||||
public void Insert_commit() {conn.Txn_sav();}
|
||||
public void Insert_end() {conn.Txn_end(); stmt_insert = Db_stmt_.Rls(stmt_insert);}
|
||||
public void Insert_rdr(int id, byte tid, long bin_len, Io_stream_rdr bin_rdr) {
|
||||
|
||||
@@ -29,6 +29,6 @@ public class Fsm_atr_mgr {
|
||||
public Fsm_atr_fil Db__core() {return db__core;}
|
||||
public Fsd_fil_itm Select_fil_or_null(byte[] dir, byte[] fil) {return db__core.Select_fil_or_null(dir, fil);}
|
||||
public boolean Select_thm(boolean exact, Fsd_thm_itm rv, int dir_id, int fil_id) {return db__core.Select_thm(exact, rv, dir_id, fil_id);}
|
||||
public void Txn_bgn() {db__core.Conn().Txn_bgn();}
|
||||
public void Txn_bgn() {db__core.Conn().Txn_bgn("fsdb__fsm_atr_mgr");}
|
||||
public void Txn_end() {db__core.Conn().Txn_end();}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class Fsm_bin_mgr {
|
||||
}
|
||||
public void Txn_bgn() {
|
||||
for (int i = 0; i < dbs__ary_len; ++i)
|
||||
dbs__ary[i].Conn().Txn_bgn();
|
||||
dbs__ary[i].Conn().Txn_bgn("fsdb__meta__bin");
|
||||
}
|
||||
public void Txn_end() {
|
||||
for (int i = 0; i < dbs__ary_len; ++i)
|
||||
|
||||
Reference in New Issue
Block a user