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

@@ -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++);