@ Override public void _whereBetween ( String fieldName , Object start , Object end , boolean exact ) { fieldName = ensureValidFieldName ( fieldName , false ) ; List < QueryToken > tokens = getCurrentWhereTokens ( ) ; appendOperatorIfNeeded ( tokens ) ; negateIfNeeded ( tokens , fieldName ) ; WhereParams startParams = new WhereParams ( ) ; startParams . setValue ( start ) ; startParams . setFieldName ( fieldName ) ; WhereParams endParams = new WhereParams ( ) ; endParams . setValue ( end ) ; endParams . setFieldName ( fieldName ) ; String fromParameterName = addQueryParameter ( start == null ? "*" : transformValue ( startParams , true ) ) ; String toParameterName = addQueryParameter ( end == null ? "NULL" : transformValue ( endParams , true ) ) ; WhereToken whereToken = WhereToken . create ( WhereOperator . BETWEEN , fieldName , null , new WhereToken . WhereOptions ( exact , fromParameterName , toParameterName ) ) ; tokens . add ( whereToken ) ; }
Matches fields where the value is between the specified start and end inclusive