File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -690,9 +690,13 @@ private Field[] getFields(String fields){
690690 javaxt .sql .Parser sqlParser = new javaxt .sql .Parser ("SELECT " + fields + " FROM T" );
691691 ArrayList <Field > arr = new ArrayList <>();
692692 for (javaxt .sql .Parser .SelectStatement stmt : sqlParser .getSelectStatements ()){
693- Field field = new Field (stmt .getField ());
693+ String column = stmt .getField ();
694+ boolean isFunction = stmt .isFunction ();
695+ if (!isFunction ) column = StringUtils .camelCaseToUnderScore (column );
696+
697+ Field field = new Field (column );
694698 field .setAlias (stmt .getAlias ());
695- field .isFunction (stmt . isFunction () );
699+ field .isFunction (isFunction );
696700 arr .add (field );
697701 }
698702 return arr .toArray (new Field [arr .size ()]);
@@ -897,7 +901,7 @@ else if (val.toLowerCase().startsWith("contains(") && val.endsWith(")")){
897901 }
898902
899903
900-
904+ key = StringUtils . camelCaseToUnderScore ( key );
901905 filter .set (key , op , val );
902906 }
903907
@@ -1016,6 +1020,10 @@ public Field(String field){
10161020 isFunction = false ;
10171021 }
10181022
1023+ public String getColumn (){
1024+ return col ;
1025+ }
1026+
10191027 public void setAlias (String alias ){
10201028 this .alias = alias ;
10211029 }
You can’t perform that action at this time.
0 commit comments