1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

'v3.4.1.1'

This commit is contained in:
gnosygnu
2016-04-04 21:26:29 -04:00
parent baaef32df2
commit b2a06b8125
252 changed files with 2882 additions and 2118 deletions

View File

@@ -18,16 +18,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.dbs; import gplx.*;
import gplx.dbs.metas.*; import gplx.dbs.sqls.*; import gplx.dbs.sqls.wtrs.*;
class Db_diff_bldr {
private final Bry_bfr bfr = Bry_bfr.new_();
private final Sql_schema_wtr sql_bldr = new Sql_schema_wtr();
private final Bry_bfr bfr = Bry_bfr.new_();
private final Sql_schema_wtr sql_bldr = new Sql_schema_wtr();
public Db_diff_bldr() {sql_bldr.Bfr_(bfr);}
public String Compare_db(String src_str, String trg_str) {
// Io_url src_url = Io_url_.new_fil_(src_str);
// Io_url trg_url = Io_url_.new_fil_(trg_str);
// Db_conn src_conn = Db_conn_bldr.Instance.Get_or_new(src_url).Conn();
// Db_conn trg_conn = Db_conn_bldr.Instance.Get_or_new(trg_url).Conn();
Dbmeta_tbl_mgr src_tbls = new Dbmeta_tbl_mgr();
Dbmeta_tbl_mgr trg_tbls = new Dbmeta_tbl_mgr();
Dbmeta_tbl_mgr src_tbls = new Dbmeta_tbl_mgr(Dbmeta_reload_cmd_.Noop);
Dbmeta_tbl_mgr trg_tbls = new Dbmeta_tbl_mgr(Dbmeta_reload_cmd_.Noop);
return Compare_tbls(src_tbls, trg_tbls);
}
public String Compare_tbls(Dbmeta_tbl_mgr src_tbls, Dbmeta_tbl_mgr trg_tbls) {

View File

@@ -18,10 +18,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.dbs.cfgs; import gplx.*; import gplx.dbs.*;
import gplx.core.primitives.*;
public class Db_cfg_tbl implements Rls_able {
private final String tbl_name; private final Dbmeta_fld_list flds = Dbmeta_fld_list.new_();
private final String fld_grp, fld_key, fld_val;
private final String tbl_name; private final Dbmeta_fld_list flds = Dbmeta_fld_list.new_();
private final String fld_grp, fld_key, fld_val;
private Db_stmt stmt_insert, stmt_update, stmt_select;
public Db_conn Conn() {return conn;} private final Db_conn conn;
public Db_conn Conn() {return conn;} private final Db_conn conn;
public Db_cfg_tbl(Db_conn conn, String tbl_name) {
this.conn = conn; this.tbl_name = tbl_name;
this.fld_grp = flds.Add_str("cfg_grp", 255);
@@ -64,6 +64,8 @@ public class Db_cfg_tbl implements Rls_able {
}
public void Upsert_yn (String grp, String key, boolean val) {Upsert_str(grp, key, val ? "y" : "n");}
public void Upsert_int (String grp, String key, int val) {Upsert_str(grp, key, Int_.To_str(val));}
public void Upsert_date (String grp, String key, DateAdp val) {Upsert_str(grp, key, val.XtoStr_fmt_yyyyMMdd_HHmmss());}
public void Upsert_guid (String grp, String key, Guid_adp val) {Upsert_str(grp, key, val.To_str());}
public void Upsert_str (String grp, String key, String val) {
String cur_val = this.Select_str_or(grp, key, null);
if (cur_val == null) this.Insert_str(grp, key, val);

View File

@@ -19,8 +19,8 @@ package gplx.dbs.metas; import gplx.*; import gplx.dbs.*;
import gplx.dbs.metas.updates.*;
public class Schema_db_mgr {
public Schema_loader_mgr Loader() {return loader;} public void Loader_(Schema_loader_mgr v) {loader = v;} private Schema_loader_mgr loader;
public Schema_update_mgr Updater() {return updater;} private final Schema_update_mgr updater = new Schema_update_mgr();
public Dbmeta_tbl_mgr Tbl_mgr() {return tbl_mgr;} private final Dbmeta_tbl_mgr tbl_mgr = new Dbmeta_tbl_mgr();
public Schema_update_mgr Updater() {return updater;} private final Schema_update_mgr updater = new Schema_update_mgr();
public Dbmeta_tbl_mgr Tbl_mgr() {return tbl_mgr;} private final Dbmeta_tbl_mgr tbl_mgr = new Dbmeta_tbl_mgr(Dbmeta_reload_cmd_.Noop);
public void Init(Db_conn conn) {
loader.Load(this, conn);
updater.Update(this, conn);