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

v2.11.1.1

This commit is contained in:
gnosygnu
2015-11-01 20:50:05 -05:00
parent 4f43f51b18
commit b990ec409f
858 changed files with 6758 additions and 4187 deletions

View File

@@ -49,7 +49,7 @@ public interface Db_stmt extends RlsAble {
Db_stmt Crt_bry_as_str(String k, byte[] v);
Db_stmt Val_bry_as_str(String k, byte[] v);
Db_stmt Val_bry_as_str(byte[] v);
Db_stmt Val_rdr_(gplx.ios.Io_stream_rdr rdr, long rdr_len);
Db_stmt Val_rdr_(gplx.core.ios.Io_stream_rdr rdr, long rdr_len);
boolean Exec_insert();
int Exec_update();
int Exec_delete();

View File

@@ -98,10 +98,10 @@ public class Db_stmt__mem implements Db_stmt {
try {Add(k, where, v);} catch (Exception e) {throw Err_.new_exc(e, "db", "failed to add value", "type", "String", "val", v);}
return this;
}
public Db_stmt Val_rdr_(gplx.ios.Io_stream_rdr v, long rdr_len) {
public Db_stmt Val_rdr_(gplx.core.ios.Io_stream_rdr v, long rdr_len) {
try {
Bry_bfr bfr = Bry_bfr.new_();
gplx.ios.Io_stream_rdr_.Load_all_to_bfr(bfr, v);
gplx.core.ios.Io_stream_rdr_.Load_all_to_bfr(bfr, v);
Add("", Bool_.N, bfr.To_str_and_clear());
} catch (Exception e) {throw Err_.new_exc(e, "db", "failed to add value", "type", "rdr", "val", v);}
return this;

View File

@@ -17,7 +17,7 @@ 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 gplx.stores.*; /*DsvDataRdr*/ import gplx.stores.dsvs.*; /*DsvDataWtr*/
import gplx.stores.*; /*DsvDataRdr*/ import gplx.langs.dsvs.*; /*DsvDataWtr*/
public class TdbDbLoadMgr_tst {
@Before public void setup() {
Io_url dbInfo = Io_url_.mem_fil_("mem/dir/db0.dsv");

View File

@@ -17,7 +17,7 @@ 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 gplx.stores.dsvs.*; /*DsvDataWtr*/
import gplx.langs.dsvs.*; /*DsvDataWtr*/
public class TdbDbSaveMgr_tst {
@Before public void setup() {
Io_url dbInfo = Io_url_.mem_fil_("mem/dir/db0.dsv");

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.stores.dsvs.*; /*DsvStoreLayout*/
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));}
public void Add(TdbFile src) {Add_base(src.Id(), src);}

View File

@@ -17,7 +17,7 @@ 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 gplx.ios.*; /*IoMgrFxt*/ import gplx.dbs.qrys.*;
import gplx.core.ios.*; /*IoMgrFxt*/ import gplx.dbs.qrys.*;
public class TdbFlush_tst {
@Before public void setup() {
Io_mgr.Instance.InitEngine_mem();

View File

@@ -18,7 +18,7 @@ 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.stores.*;
import gplx.stores.xmls.*; /*XmlDataRdr*/
import gplx.stores.dsvs.*; /*DsvDataWtr*/
import gplx.langs.dsvs.*; /*DsvDataWtr*/
import gplx.lists.*; /*GfoNdeRdr*/
class TdbStores {
public static final String Dsv = "dsv";

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.stores.dsvs.*; /*DsvStoreLayout*/
import gplx.*; /*GfoNdeList*/ import gplx.stores.*; import gplx.langs.dsvs.*; /*DsvStoreLayout*/
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.stores.dsvs.*; /*DsvStoreLayout*/
import gplx.lists.*; /*Ordered_hash_base*/ import gplx.langs.dsvs.*; /*DsvStoreLayout*/
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

@@ -45,7 +45,7 @@ public class Db_qry_sql implements Db_qry {
Bry_bfr bfr = Bry_bfr.new_(src_len);
while (pos < src_len) {
int question_pos = Bry_find_.Find_fwd(src, Byte_ascii.Question, pos);
if (question_pos == Bry_.NotFound)
if (question_pos == Bry_find_.Not_found)
question_pos = src_len;
bfr.Add_mid(src, pos, question_pos);
if (args_idx < args_len)
@@ -70,9 +70,9 @@ public class Db_qry_sql implements Db_qry {
else if (Type_adp_.Eq(val_type, Byte_.Cls_ref_type))
bfr.Add_byte(Byte_.cast(val));
else if (Type_adp_.Eq(val_type, DateAdp_.Cls_ref_type))
bfr.Add_byte_apos().Add_str(DateAdp_.cast(val).XtoStr_gplx_long()).Add_byte_apos();
bfr.Add_byte_apos().Add_str_a7(DateAdp_.cast(val).XtoStr_gplx_long()).Add_byte_apos();
else if (Type_adp_.Eq(val_type, Decimal_adp_.Cls_ref_type))
bfr.Add_str(Decimal_adp_.cast(val).To_str());
bfr.Add_str_a7(Decimal_adp_.cast(val).To_str());
else {
byte[] val_bry = Bry_.new_u8(Object_.Xto_str_strict_or_null(val));
val_bry = Bry_.Replace(val_bry, Byte_ascii.Apos_bry, Bry_escape_apos);

View File

@@ -106,7 +106,7 @@ public class Db_stmt_cmd implements Db_stmt {
try {stmt.setString(++val_idx, v);} catch (Exception e) {this.Rls(); throw Err_.new_exc(e, "db", "failed to add value", "type", "String", "val", v, "sql", sql);}
return this;
}
public Db_stmt Val_rdr_(gplx.ios.Io_stream_rdr v, long rdr_len) {
public Db_stmt Val_rdr_(gplx.core.ios.Io_stream_rdr v, long rdr_len) {
try {stmt.setBinaryStream(++val_idx, (java.io.InputStream)v.Under(), (int)rdr_len);} catch (Exception e) {throw Err_.new_exc(e, "db", "failed to add value", "type", "rdr", "val", v);}
return this;
}

View File

@@ -90,10 +90,10 @@ public class Db_stmt_sql implements Db_stmt {// used for formatting SQL statemen
try {Add(k, Val_str_wrap(v));} catch (Exception e) {throw Err_.new_exc(e, "db", "failed to add value", "type", "String", "val", v);}
return this;
}
public Db_stmt Val_rdr_(gplx.ios.Io_stream_rdr v, long rdr_len) {
public Db_stmt Val_rdr_(gplx.core.ios.Io_stream_rdr v, long rdr_len) {
try {
Bry_bfr bfr = Bry_bfr.new_();
gplx.ios.Io_stream_rdr_.Load_all_to_bfr(bfr, v);
gplx.core.ios.Io_stream_rdr_.Load_all_to_bfr(bfr, v);
Add(Key_na, bfr.To_str_and_clear());
} catch (Exception e) {throw Err_.new_exc(e, "db", "failed to add value", "type", "rdr", "val", v);}
return this;
@@ -146,7 +146,7 @@ public class Db_stmt_sql implements Db_stmt {// used for formatting SQL statemen
int arg_idx = 0; int pos_prv = 0;
tmp_bfr.Clear();
while (true) {
int pos_cur = Bry_find_.Find_fwd(sql_bry, Byte_ascii.Question, pos_prv); if (pos_cur == Bry_.NotFound) break;
int pos_cur = Bry_find_.Find_fwd(sql_bry, Byte_ascii.Question, pos_prv); if (pos_cur == Bry_find_.Not_found) break;
tmp_bfr.Add_mid(sql_bry, pos_prv, pos_cur);
tmp_bfr.Add_byte(Byte_ascii.Tilde).Add_byte(Byte_ascii.Curly_bgn);
tmp_bfr.Add_int_variable(arg_idx++);

View File

@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.dbs.sqls; import gplx.*; import gplx.dbs.*;
import org.junit.*; import gplx.core.strings.*;
import gplx.core.criterias.*; /*Criteria_base*/
import gplx.ios.*; import gplx.dbs.sqls.*;
import gplx.core.ios.*; import gplx.dbs.sqls.*;
public class Sql_qry_wtr_iosql_tst {
@Test public void Type() {
fld = IoItm_base_.Prop_Type;

View File

@@ -51,12 +51,12 @@ public class Db_data_rdr extends DataRdr_base implements DataRdr {
return DateAdp_.dateTime_(g);
}
@Override public Decimal_adp ReadDecimal(String key) {return Decimal_adp_.db_(this.Read(key));}
@Override public gplx.ios.Io_stream_rdr ReadRdr(String key) {
@Override public gplx.core.ios.Io_stream_rdr ReadRdr(String key) {
try {
java.io.InputStream input_stream = rdr.getBinaryStream(key);
return gplx.ios.Io_stream_rdr_.file_(input_stream);
return gplx.core.ios.Io_stream_rdr_.file_(input_stream);
}
catch (SQLException e) {return gplx.ios.Io_stream_rdr_.Noop;}
catch (SQLException e) {return gplx.core.ios.Io_stream_rdr_.Noop;}
}
public boolean MoveNextPeer() {