1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00
This commit is contained in:
gnosygnu
2014-08-24 23:14:26 -04:00
parent 7ee4326485
commit b0a01882de
109 changed files with 1470 additions and 1106 deletions

View File

@@ -21,7 +21,7 @@ public class Db_provider implements RlsAble {
this.engine = engine;
txn_mgr = new Db_txn_mgr_base(engine);
}
@gplx.Internal protected Db_engine Engine() {return engine;} Db_engine engine;
@gplx.Internal protected Db_engine Engine() {return engine;} private Db_engine engine;
public Db_connect ConnectInfo() {return engine.ConnectInfo();}
public Db_stmt Prepare(Db_qry qry) {return engine.New_db_stmt(this, qry);}
public int Exec_qry(Db_qry qry) {txn_mgr.Txn_count_(txn_mgr.Txn_count() + 1); return Int_.cast_(engine.Execute(qry));}

View File

@@ -26,7 +26,7 @@ public interface Db_txn_mgr {
int Txn_count(); void Txn_count_(int v);
}
class Db_txn_mgr_base implements Db_txn_mgr {
public Db_txn_mgr_base(Db_engine engine) {this.engine = engine;} Db_engine engine;
public Db_txn_mgr_base(Db_engine engine) {this.engine = engine;} private Db_engine engine;
public int Txn_depth() {return txn_depth;} int txn_depth; // NOTE: only support 1 level for now;
public void Txn_bgn_if_none() {if (txn_depth == 0) this.Txn_bgn();}
public void Txn_bgn() {