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

v2.11.3.1

This commit is contained in:
gnosygnu
2015-11-15 21:08:17 -05:00
parent d9f45cec19
commit 8a5d58a973
418 changed files with 2694 additions and 1621 deletions

View File

@@ -16,8 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs; import gplx.*;
import org.junit.*;
import gplx.core.criterias.*;
import org.junit.*; import gplx.core.criterias.*; import gplx.core.gfo_ndes.*;
public class Db_crt_tst {
@Before public void setup() {
row = GfoNde_.vals_(GfoFldList_.new_().Add("id", IntClassXtn.Instance).Add("name", StringClassXtn.Instance), Object_.Ary(1, "me"));

View File

@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs.engines.tdbs; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*;
import org.junit.*;
import org.junit.*; import gplx.core.gfo_ndes.*;
import gplx.stores.*; /*DsvDataRdr*/ import gplx.langs.dsvs.*; /*DsvDataWtr*/
public class TdbDbLoadMgr_tst {
@Before public void setup() {

View File

@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs.engines.tdbs; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*;
import gplx.core.criterias.*; import gplx.lists.*; /*GfoNde*/ import gplx.dbs.qrys.*;
import gplx.core.criterias.*; import gplx.lists.*; /*GfoNde*/ import gplx.dbs.qrys.*; import gplx.core.gfo_ndes.*;
class TdbDeleteWkr implements Db_qryWkr {
public Object Exec(Db_engine engineObj, Db_qry cmdObj) {
TdbEngine engine = TdbEngine.cast(engineObj); Db_qry_delete cmd = (Db_qry_delete)cmdObj;

View File

@@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs.engines.tdbs; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*;
import gplx.core.gfo_ndes.*;
import gplx.lists.*; /*Ordered_hash_base*/ import gplx.langs.dsvs.*; /*DsvStoreLayout*/
public class TdbFileList extends Ordered_hash_base {
public TdbFile Get_by_or_fail(int id) {return TdbFile.as_(Get_by_or_fail_base(id));}

View File

@@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs.engines.tdbs; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*;
import gplx.core.gfo_ndes.*;
import gplx.lists.*; import gplx.dbs.qrys.*; import gplx.dbs.sqls.*;
class TdbInsertWkr implements Db_qryWkr {
public Object Exec(Db_engine engineObj, Db_qry cmdObj) {

View File

@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs.engines.tdbs; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*;
import gplx.core.criterias.*; import gplx.dbs.qrys.*; import gplx.dbs.sqls.*;
import gplx.core.criterias.*; import gplx.core.gfo_ndes.*; import gplx.dbs.qrys.*; import gplx.dbs.sqls.*;
import gplx.lists.*; /*ComparerAble*/ import gplx.stores.*; /*GfoNdeRdr*/
class TdbSelectWkr implements Db_qryWkr {
public Object Exec(Db_engine engineObj, Db_qry cmdObj) {

View File

@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs.engines.tdbs; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*;
import gplx.*; /*GfoNdeList*/ import gplx.stores.*; import gplx.langs.dsvs.*; /*DsvStoreLayout*/
import gplx.*; /*GfoNdeList*/ import gplx.stores.*; import gplx.langs.dsvs.*; /*DsvStoreLayout*/ import gplx.core.gfo_ndes.*;
public class TdbTable {
public int Id() {return id;} int id;
public String Name() {return name;} private String name;

View File

@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs.engines.tdbs; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*;
import gplx.lists.*; /*Ordered_hash_base*/ import gplx.langs.dsvs.*; /*DsvStoreLayout*/
import gplx.lists.*; /*Ordered_hash_base*/ import gplx.langs.dsvs.*; /*DsvStoreLayout*/ import gplx.core.gfo_ndes.*;
public class TdbTableList extends Ordered_hash_base {
public TdbTable Get_by(String name) {return TdbTable.as_(Fetch_base(name));}
public TdbTable Get_by_or_fail(String name) {

View File

@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs.engines.tdbs; import gplx.*; import gplx.dbs.*; import gplx.dbs.engines.*;
import gplx.core.criterias.*; import gplx.lists.*; /*GfoNde*/
import gplx.core.criterias.*; import gplx.lists.*; /*GfoNde*/ import gplx.core.gfo_ndes.*;
import gplx.dbs.qrys.*;
class TdbUpdateWkr implements Db_qryWkr {
public Object Exec(Db_engine engineObj, Db_qry cmdObj) {

View File

@@ -18,7 +18,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.dbs.metas; import gplx.*; import gplx.dbs.*;
public class Meta_tbl_mgr {
private final Ordered_hash hash = Ordered_hash_.New();
public int Len() {return hash.Count();}
public void Add(Meta_tbl_itm itm) {hash.Add(itm.Name(), itm);}
public boolean Has(String name) {return hash.Has(name);}
public Meta_tbl_itm Get_by(String name) {return (Meta_tbl_itm)hash.Get_by(name);}
public Meta_tbl_itm Get_at(int i) {return (Meta_tbl_itm)hash.Get_at(i);}
public Meta_tbl_itm Get_by(String name) {return (Meta_tbl_itm)hash.Get_by(name);}
}

View File

@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs.qrys; import gplx.*; import gplx.dbs.*;
import gplx.core.criterias.*; import gplx.dbs.sqls.*;
import gplx.core.criterias.*; import gplx.dbs.sqls.*; import gplx.core.gfo_ndes.*;
public class Db_qry__select_cmd implements Db_qry {
public int Tid() {return Db_qry_.Tid_select;}
public boolean Exec_is_rdr() {return true;}

View File

@@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs.qrys; import gplx.*; import gplx.dbs.*;
import gplx.core.brys.fmtrs.*;
import gplx.dbs.engines.*;
public class Db_stmt_sql implements Db_stmt {// used for formatting SQL statements; not used for actual insert into database
private static final String Key_na = ""; // key is not_available; only called by procs with signature of Val(<type> v);

View File

@@ -18,7 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.dbs.sqls; import gplx.*; import gplx.dbs.*;
interface Db_sqlbldr {}
public class Db_sqlbldr__sqlite implements Db_sqlbldr {
private final Bry_bfr tmp_bfr = Bry_bfr.reset_(1024);
private Bry_bfr tmp_bfr = Bry_bfr.reset_(1024);
public Db_sqlbldr__sqlite Bfr_(Bry_bfr bfr) {this.tmp_bfr = bfr; return this;}
public String Bld_create_idx(Db_meta_idx idx) {
tmp_bfr.Add_str_a7("CREATE ");
if (idx.Unique())
@@ -95,5 +96,5 @@ public class Db_sqlbldr__sqlite implements Db_sqlbldr {
default: throw Err_.new_unhandled(tid);
}
}
public static final Db_sqlbldr__sqlite Instance = new Db_sqlbldr__sqlite(); Db_sqlbldr__sqlite() {}
public static final Db_sqlbldr__sqlite Instance = new Db_sqlbldr__sqlite();
}

View File

@@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs.sqls; import gplx.*; import gplx.dbs.*;
import gplx.core.gfo_ndes.*;
import gplx.lists.*;
public class Sql_order_by_sorter implements ComparerAble {
public int compare(Object lhsObj, Object rhsObj) {

View File

@@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs.sqls; import gplx.*; import gplx.dbs.*;
import gplx.core.gfo_ndes.*;
public class Sql_select_fld_ {
public static Sql_select_fld_base new_fld(String tbl, String fld, String alias) {return new Sql_select_fld_fld(tbl, fld, alias);}
public static Sql_select_fld_base new_count(String tbl, String fld, String alias) {return new Sql_select_fld_count(tbl, fld, alias);}

View File

@@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs.sqls; import gplx.*; import gplx.dbs.*;
import gplx.core.gfo_ndes.*;
public abstract class Sql_select_fld_base {
public String Tbl() {return tbl;} public void Tbl_set(String val) {tbl = val;} private String tbl;
public String Fld() {return fld;} public void Fld_set(String val) {fld = val;} private String fld;

View File

@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs.sqls; import gplx.*; import gplx.dbs.*;
import gplx.core.strings.*;
import gplx.core.strings.*; import gplx.core.gfo_ndes.*;
import gplx.dbs.engines.tdbs.*;
public class Sql_select_fld_list {
public int Count() {return hash.Count();}

View File

@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.stores; import gplx.*;
import gplx.core.criterias.*; import gplx.dbs.*;
import gplx.core.criterias.*; import gplx.dbs.*; import gplx.core.gfo_ndes.*;
public class DbMaprRdr extends DataRdr_base implements SrlMgr {
@Override public String NameOfNode() {return "DbMaprRdr";}
@Override public Object StoreRoot(SrlObj subProto, String key) {

View File

@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.stores; import gplx.*;
import gplx.core.criterias.*;
import gplx.core.criterias.*; import gplx.core.gfo_ndes.*;
import gplx.dbs.*; import gplx.dbs.qrys.*;
public class DbMaprWtr extends DataWtr_base implements DataWtr {
public void InitWtr(String key, Object val) {}

View File

@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs; import gplx.*;
import gplx.dbs.engines.sqlite.*; import gplx.dbs.engines.mysql.*; import gplx.dbs.engines.postgres.*;
import gplx.dbs.engines.sqlite.*; import gplx.dbs.engines.mysql.*; import gplx.dbs.engines.postgres.*; import gplx.core.gfo_ndes.*;
public class Db_conn_fxt implements RlsAble {
public Db_conn Conn() {return conn;} public Db_conn_fxt Conn_(Db_conn v) {conn = v; return this;} Db_conn conn;
public void DmlAffectedAvailable_(boolean v) {dmlAffectedAvailable = v;} private boolean dmlAffectedAvailable = true;

View File

@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs; import gplx.*;
import gplx.dbs.qrys.*;
import gplx.dbs.qrys.*; import gplx.core.gfo_ndes.*;
public class Db_qry_fxt {
public static void Insert_kvo(Db_conn conn, String tblName, KeyValList kvList) {
Db_qry_insert qry = Db_qry_.insert_(tblName);

View File

@@ -16,6 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs; import gplx.*;
import gplx.core.gfo_ndes.*;
public class GfoNdeTstr {
public static void tst_ValsByCol(GfoNde nde, String fld, Object... expdAry) {
List_adp expd = List_adp_.new_();

View File

@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs.groupBys; import gplx.*; import gplx.dbs.*;
import org.junit.*; import gplx.dbs.qrys.*;
import org.junit.*; import gplx.dbs.qrys.*; import gplx.core.gfo_ndes.*;
public abstract class GroupBys_base_tst {
protected abstract Db_conn provider_();
protected Db_conn conn;

View File

@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs.insertIntos; import gplx.*; import gplx.dbs.*;
import org.junit.*; import gplx.dbs.qrys.*;
import org.junit.*; import gplx.core.gfo_ndes.*; import gplx.dbs.qrys.*;
public abstract class InsertIntos_base_tst {
protected abstract Db_conn provider_();
protected Db_conn conn;

View File

@@ -16,7 +16,7 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.dbs.joins; import gplx.*; import gplx.dbs.*;
import org.junit.*; import gplx.dbs.qrys.*; import gplx.dbs.sqls.*;
import org.junit.*; import gplx.core.gfo_ndes.*; import gplx.dbs.qrys.*; import gplx.dbs.sqls.*;
public abstract class Joins_base_tst {
protected Db_conn conn;
@Before public void setup() {