构建like模糊查询需要的SqlInfo信息.
@param fieldText 数据库字段的文本
@param value 参数值
@return sqlInfo
978827
public SqlInfo buildLikeSql(String fieldText, Object value) {
        // 由于默认配置的suffix的值只是" LIKE "和" NOT LIKE "两个关键字，生成的LIKE SQL片段需要加上" ? "占位符.
        this.suffix = StringHelper.isBlank(this.suffix) ? ZealotConst.LIKE_KEY : this.suffix;
        join.append(prefix).append(fieldText).append(suffix).append("? ");
        params.add("%" + value + "%");
        return sqlInfo.setJoin(join).setParams(params);
    }
553403
public SqlInfo buildBetweenSql(String fieldText, String startText, String endText) {
        // 获取开始属性值和结束属性值,作区间查询
        Object startValue = ParseHelper.parseExpress(startText, context);
        Object endValue = ParseHelper.parseExpress(endText, context);
        return super.buildBetweenSql(fieldText, startValue, endValue);
    }
1093712
public Query like(int docNum) throws IOException
   {
      if (fieldNames == null)
      {
         setFieldNames();
      }

      return createQuery(retrieveTerms(docNum));
   }
298219
public static Query notEquals(String field, Object value) {
        return new Query().notEquals(field, value);
    }
321931
private String processSqlParams(Object value) {

        Object[] arr = null;
        if (value != null) {
            arr = TypeMappingsFactory.toObjectArray(value);
        }

        if (value == null || (arr != null && arr.length == 0)) {
            return "";
        } else if (arr != null) {
            StringBuilder result = new StringBuilder();
            for (int i = 0; i < arr.length; i++) {
                if (i > 0) {
                    result.append(',');
                    result.append(arr[i].toString());
                } else {
                    result.append(arr[i].toString());
                }
            }
            return result.toString();
        } else {
            return value.toString();
        }
    }
510719
public static Query withMatchingString(String field, String value, boolean caseInsensitive) {
        return caseInsensitive ? regex(field, escapeRegExPattern(value), caseInsensitive, false, false, false) : withValue(field, eq, value);
    }
701161
@SafeVarargs
  static <T> String sqlArgumentList(T... values) {
    StringBuilder sb = new StringBuilder();
    if (values.length != 0) {
      sb.append(values[0]);
      for (int i=1; i < values.length; i++) {
        sb.append(',').append(' ').append(values[i]);
      }
    }
    return sb.toString();
  }
429401
public int insert(String sql, Object value) {
        Class<?> parameterType = value != null ? value.getClass() : null;
        String msId = msUtils.insertDynamic(sql, parameterType);
        return sqlSession.insert(msId, value);
    }
949928
static Object getAdditionalFieldValue(String value, String fieldType) {

        Object result = null;
        if (fieldType.equalsIgnoreCase(FIELD_TYPE_DISCOVER)) {

            Result discoveredType = ValueDiscovery.discover(value);

            if (discoveredType == Result.STRING) {
                return value;
            }

            if (discoveredType == Result.LONG) {
                try {
                    // try adding the value as a long
                    return Long.parseLong(value);
                } catch (NumberFormatException ex) {
                    // fallback on the double value
                    return value;
                }
            }

            try {
                return Double.parseDouble(value);
            } catch (NumberFormatException ex) {
                // fallback on the string value
                return value;
            }
        }

        if (fieldType.equalsIgnoreCase(FIELD_TYPE_STRING)) {
            result = value;
        }

        if (fieldType.equals(FIELD_TYPE_DOUBLE) || fieldType.equalsIgnoreCase(FIELD_TYPE_DOUBLE2)) {
            try {
                result = Double.parseDouble(value);
            } catch (NumberFormatException ex) {
                if (fieldType.equals(FIELD_TYPE_DOUBLE)) {
                    result = Double.valueOf(0);
                }
            }
        }

        if (fieldType.equals(FIELD_TYPE_LONG) || fieldType.equalsIgnoreCase(FIELD_TYPE_LONG2)) {
            try {
                result = (long) Double.parseDouble(value);
            } catch (NumberFormatException ex) {
                if (fieldType.equals(FIELD_TYPE_LONG)) {
                    result = Long.valueOf(0);
                }
            }
        }

        return result;
    }
750523
public void setDate(String fieldName, Date value) {
		if (value == null) {
			throw new IllegalArgumentException("参数值[" + fieldName + "]不能为NULL.");
		}
		fieldList.add(fieldName);
		statementParameter.setDate(value);
	}
1002930
public ZealotKhala orLike(String field, Object value) {
        return this.doLike(ZealotConst.OR_PREFIX, field, value, true, true);
    }
408131
public SqlInfo buildTextSqlParams(String valueText) {
        // 获取value值，判断是否为空，若为空，则直接退出本方法
        Object obj = ParseHelper.parseExpressWithException(valueText, context);
        obj = obj == null ? new Object(){} : obj;

        Object[] values = this.convertToArray(obj);
        for (Object objVal: values) {
            this.sqlInfo.getParams().add(objVal);
        }
        return sqlInfo;
    }
151341
public String toSqlString(Object value) {
     if (value == null) {
        return "null";
     }
      
     String val = String.valueOf(value);

     if (value instanceof Integer ||
         value instanceof Float ||
         value instanceof Double ||
         value instanceof Long) {
       return val;
     } else if (value instanceof Boolean) {
        return "'" + ((Boolean) value ? "true" : "false") + "'";
     } else if (value instanceof Date) {
        return String.valueOf(((Date) value).getTime());
     } else {
       return "'" + val + "'"; // TODO escape special characters in val here
     }
   }
974103
public function addWhereFieldIsNotLike($field, $like_value, $left_any = true, $right_any = true, $table = ''): self
    {
        if (!$table) {
            $table = $this->getDbTableName();
        }

        $this->addWhereFieldAsString('`'. $table .'`.`'. $field .'` NOT LIKE "'. ($left_any ? '%' : '') . sql_prepare($like_value, true) . ($right_any ? '%' : '') .'"');

        return $this;
    }
940839
public TResult queryForValueFieldValues(Map<String, ColumnValue> fieldValues) {
		String where = buildValueWhere(fieldValues.entrySet());
		String[] whereArgs = buildValueWhereArgs(fieldValues.values());
		TResult result = userDb.query(getTableName(), table.getColumnNames(),
				where, whereArgs, null, null, null);
		prepareResult(result);
		return result;
	}
32130
public SqlInfo buildLikeSql(String fieldText, String valueText, String patternText) {
        if (StringHelper.isNotBlank(valueText) && StringHelper.isBlank(patternText)) {
            return super.buildLikeSql(fieldText, ParseHelper.parseExpressWithException(valueText, context));
        } else if (StringHelper.isBlank(valueText) && StringHelper.isNotBlank(patternText)) {
            return super.buildLikePatternSql(fieldText, patternText);
        } else {
            throw new ValidFailException("<like /> 标签中的'value'属性和'pattern'属性不能同时为空或者同时不为空！");
        }
    }
1147720
public boolean setDbInfo(String field, String value) {
        boolean result = false;
        if (dbInfo.contains(field)) {
            dbConnectInfo.put(field, value);
            result = true;
        }
        return result;
    }