生成带" OR "前缀不等查询的SQL片段.
@param field 数据库字段
@param value 值
@return ZealotKhala实例
763743
public ZealotKhala orNotEqual(String field, Object value) {
        return this.doNormal(ZealotConst.OR_PREFIX, field, value, ZealotConst.NOT_EQUAL_SUFFIX, true);
    }
422201
public ZealotKhala andLessThan(String field, Object value) {
        return this.doNormal(ZealotConst.AND_PREFIX, field, value, ZealotConst.LT_SUFFIX, true);
    }
1327030
public function havingOr($field, $opt=null, $value) {

        if ( $field instanceof \Closure ) {    //处理闭包
            $this->sqlBuilder->sqlAppend(" OR (");
            $this->sqlBuilder->enterClosure();
            call_user_func($field);
            $this->sqlBuilder->addHaving(") ");
        } else {
            $this->sqlBuilder->addHaving($field, $opt, $value, 'OR');
        }
        return $this;
    }
1040869
public TResult queryForLike(String fieldName, ColumnValue value) {
		String where = buildWhereLike(fieldName, value);
		String[] whereArgs = buildWhereArgs(value);
		TResult result = userDb.query(getTableName(), table.getColumnNames(),
				where, whereArgs, null, null, null);
		prepareResult(result);
		return result;
	}
429176
public static Query withValue(String field,
                                  BinOp op,
                                  Object value) {
        return withValue(field, op, Literal.value(value));
    }
1308895
public ZealotKhala andLessEqual(String field, Object value) {
        return this.doNormal(ZealotConst.AND_PREFIX, field, value, ZealotConst.LTE_SUFFIX, true);
    }
1167101
private ValuesSourceAggregationBuilder makeCountAgg(MethodField field) {

        // Cardinality is approximate DISTINCT.
        if ("DISTINCT".equals(field.getOption())) {

            if (field.getParams().size() == 1) {
                return AggregationBuilders.cardinality(field.getAlias()).field(field.getParams().get(0).value.toString());
            } else {
                Integer precision_threshold = (Integer) (field.getParams().get(1).value);
                return AggregationBuilders.cardinality(field.getAlias()).precisionThreshold(precision_threshold).field(field.getParams().get(0).value.toString());
            }

        }

        String fieldName = field.getParams().get(0).value.toString();

        /*
        zhongshu-comment count(1) count(0)这种应该是查不到东西的，除非你的字段名就叫做1、0这样
            es的count是针对某个字段做count的，见下面的dsl，对os这个字段做count
                "aggregations": {
                    "COUNT(os)": {
                      "value_count": {
                        "field": "os"
                      }
                    }
                 }

            假如你是写count(*)，那es-sql就帮你转成对"_index"字段做count，每一条数据都会有"_index"字段，该字段存储的是索引的名字
         */
        // In case of count(*) we use '_index' as field parameter to count all documents
        if ("*".equals(fieldName)) {
            KVValue kvValue = new KVValue(null, "_index");
            field.getParams().set(0, kvValue);
            /*
            zhongshu-comment 这个看起来有点多此一举：先将"_index"字符串封装到KVValue中，然后再kv.toString()得到"_index"字符串，还不如直接将"_index"传进去AggregationBuilders.count(field.getAlias()).field("_index");
            其实目的是为了改变形参MethodField field的params参数中的值，由"*"改为"_index"
             */
            return AggregationBuilders.count(field.getAlias()).field(kvValue.toString());
        } else {
            return AggregationBuilders.count(field.getAlias()).field(fieldName);
        }
    }
1293251
public ZealotKhala andIsNotNull(String field) {
        return this.doIsNull(ZealotConst.AND_PREFIX, field, true,false);
    }
1309506
public <T> List<Entity> find(String field, T value) throws SQLException {
		return this.find(Entity.create(tableName).set(field, value));
	}
1263726
public static final String getter(Field field, String fieldName)
    {
        Class<?> type = field.getType();
        if (type.isPrimitive() && "boolean".equals(type.getName()))
        {
            return isser(fieldName);
        }
        else
        {
            return getter(fieldName);
        }
    }
274354
def field_or_value(clause):
    
    if hasattr(clause, "getName") and clause.getName() != "field":
        return Value(resolve(clause))
    else:
        return Field(clause)
253626
public AnimaQuery<T> or(String statement, Object value) {
        conditionSQL.append(" OR (").append(statement);
        if (!statement.contains("?")) {
            conditionSQL.append(" = ?");
        }
        conditionSQL.append(')');
        paramValues.add(value);
        return this;
    }
503301
public ZealotKhala moreEqual(String field, Object value) {
        return this.doNormal(ZealotConst.ONE_SPACE, field, value, ZealotConst.GTE_SUFFIX, true);
    }
340561
public function whereOr($field, $opt=null, $value=null) {
        if ( $field instanceof \Closure ) {
            $this->sqlBuilder->sqlAppend(" OR (");
            $this->sqlBuilder->enterClosure();
            call_user_func($field);
            $this->sqlBuilder->addWhere(") ");
        } else {
            $this->sqlBuilder->addWhere($field, $opt, $value, 'OR');
        }
        return $this;
    }
4627
public TResult queryForLike(String fieldName, Object value) {
		return queryForLike(fieldName, value, null, null, null);
	}
975435
public function orWhereRegex($field, $value)
    {
        if (! $value instanceof MongoRegex) {
            $value = new MongoRegex($value);
        }

        return $this->formatWhere('$or', $field, $value);
    }
643885
@VisibleForTesting
    FieldValue createFieldValue(SearchQueryField field, String quotedStringValue, boolean negate) {
        // Make sure there are no quotes in the value (e.g. `"foo"' --> `foo')
        final String value = quotedStringValue.replaceAll(QUOTE_REPLACE_REGEX, "");
        final SearchQueryField.Type fieldType = field.getFieldType();
        final Pair<String, SearchQueryOperator> pair = extractOperator(value, fieldType == STRING ? DEFAULT_STRING_OPERATOR : DEFAULT_OPERATOR);

        switch (fieldType) {
            case DATE:
                return new FieldValue(parseDate(pair.getLeft()), pair.getRight(), negate);
            case STRING:
                return new FieldValue(pair.getLeft(), pair.getRight(), negate);
            case INT:
                return new FieldValue(Integer.parseInt(pair.getLeft()), pair.getRight(), negate);
            case LONG:
                return new FieldValue(Long.parseLong(pair.getLeft()), pair.getRight(), negate);
            default:
                throw new IllegalArgumentException("Unhandled field type: " + fieldType.toString());
        }
    }