mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.8.5.1
This commit is contained in:
@@ -155,7 +155,7 @@ public class Sql_qry_wtr_ansi implements Sql_qry_wtr {
|
||||
}
|
||||
Class<?> val_type = val.getClass();
|
||||
if (val_type == Bool_.Cls_ref_type)
|
||||
sb.Add_obj(Bool_.Xto_int(Bool_.cast_(val))); // NOTE: save boolean to 0 or 1, b/c (a) db may not support bit datatype (sqllite) and (b) avoid i18n issues with "true"/"false"
|
||||
sb.Add_obj(Bool_.To_int(Bool_.cast(val))); // NOTE: save boolean to 0 or 1, b/c (a) db may not support bit datatype (sqllite) and (b) avoid i18n issues with "true"/"false"
|
||||
else if
|
||||
( val_type == Byte_.Cls_ref_type || val_type == Short_.Cls_ref_type
|
||||
|| val_type == Int_.Cls_ref_type || val_type == Long_.Cls_ref_type
|
||||
|
||||
@@ -39,7 +39,7 @@ public class Sql_qry_wtr_iosql_tst {
|
||||
@Test public void Url() {
|
||||
fld = IoItm_base_.Prop_Path;
|
||||
tst_Write("url='C:\\fil.txt'", ioCrt_(fld, Criteria_.eq_("C:\\fil.txt")));
|
||||
tst_Write("url IOMATCH '*.txt'", ioCrt_(fld, Criteria_ioMatch.parse_(true, "*.txt", false)));
|
||||
tst_Write("url IOMATCH '*.txt'", ioCrt_(fld, Criteria_ioMatch.parse(true, "*.txt", false)));
|
||||
}
|
||||
@Test public void Binary() {
|
||||
// parentheses around lhs and rhs
|
||||
|
||||
@@ -42,7 +42,7 @@ class Sql_select_fld_count extends Sql_select_fld_func_base {
|
||||
@Override public void GroupBy_type(GfoFld fld) {this.ValType_set(IntClassXtn._);}
|
||||
@Override public Object GroupBy_eval(Object groupByVal, Object curVal, ClassXtn type) {
|
||||
if (groupByVal == null) return 1;
|
||||
return Int_.cast_(groupByVal) + 1;
|
||||
return Int_.cast(groupByVal) + 1;
|
||||
}
|
||||
}
|
||||
class Sql_select_fld_sum extends Sql_select_fld_func_base {
|
||||
@@ -50,8 +50,8 @@ class Sql_select_fld_sum extends Sql_select_fld_func_base {
|
||||
@Override public String XtoSql_functionName() {return "SUM";}
|
||||
@Override public void GroupBy_type(GfoFld fld) {this.ValType_set(IntClassXtn._);}
|
||||
@Override public Object GroupBy_eval(Object groupByVal, Object curVal, ClassXtn type) {
|
||||
if (groupByVal == null) return Int_.cast_(curVal);
|
||||
return Int_.cast_(groupByVal) + Int_.cast_(curVal);
|
||||
if (groupByVal == null) return Int_.cast(curVal);
|
||||
return Int_.cast(groupByVal) + Int_.cast(curVal);
|
||||
}
|
||||
}
|
||||
class Sql_select_fld_minMax extends Sql_select_fld_func_base {
|
||||
|
||||
Reference in New Issue
Block a user