Build where clause with given clause.

@param builder
the builder
@param fieldClazz
the field clazz
@param field
the field
@param value
the value
@param clause
the clause
@param useToken
the use token
769314
public void buildWhereClause(StringBuilder builder, Class fieldClazz, String field, Object value, String clause,
            boolean useToken)
    {

        builder = onWhereClause(builder, fieldClazz, field, value, clause, useToken);
        builder.append(AND_CLAUSE);
    }
1261530
private function applyFilter(Builder $query, $field, $filter, $or = false)
    {
        $filter = explode(':', $filter);
        if (count($filter) > 1) {
            $operator = $this->getFilterOperator($filter[0]);
            $value = $this->replaceWildcards($filter[1]);
        }
        else {
            $operator = '=';
            $value = $this->replaceWildcards($filter[0]);
        }

        $fields = explode('.', $field);
        if (count($fields) > 1) {
            return $this->applyNestedFilter($query, $fields, $operator, $value, $or);
        }
        else {
            return $this->applyWhereClause($query, $field, $operator, $value, $or);
        }
    }
1271747
public function buildContentFieldValue(FormBuilderInterface $builder, FieldInterface $field)
    {
        parent::buildContentFieldValue($builder, $field);

        $builder->get('value')
            ->add('href', UrlType::class)
        ;
    }
658198
public TermsByQueryRequest query(XContentBuilder builder) {
    this.querySource = builder == null ? null : builder.bytes();
    return this;
  }
1084156
def field_or_value(clause):
    
    if hasattr(clause, "getName") and clause.getName() != "field":
        if clause.getName() == "set_function":
            return SetFunction.from_clause(clause)
        else:
            return Value(resolve(clause))
    else:
        return Field(clause)
296671
public void buildWhereClause(StringBuilder builder, String field, Field member, Object entity)
    {
        // builder = ensureCase(builder, field, false);
        // builder.append(EQ_CLAUSE);
        // appendColumnValue(builder, entity, member);
        // builder.append(AND_CLAUSE);
        Object value = PropertyAccessorHelper.getObject(entity, member);
        buildWhereClause(builder, member.getType(), field, value, EQ_CLAUSE, false);
    }
1233620
private void addFieldsToBuilder(String[] fieldsToSelect, Class clazz, MetamodelImpl metaModel,
            SearchRequestBuilder builder)
    {
        if (fieldsToSelect != null && fieldsToSelect.length > 1 && !(fieldsToSelect[1] == null))
        {
            logger.debug("Fields added in query are: ");
            for (int i = 1; i < fieldsToSelect.length; i++)
            {
                logger.debug(i + " : " + fieldsToSelect[i]);
                builder = builder.addField(((AbstractAttribute) metaModel.entity(clazz).getAttribute(fieldsToSelect[i]))
                        .getJPAColumnName());
            }
        }
    }
792458
private function wherePhonetic(Builder $query, $field, string $soundex): void
    {
        if ($soundex !== '') {
            $query->where(static function (Builder $query) use ($soundex, $field): void {
                foreach (explode(':', $soundex) as $sdx) {
                    $query->orWhere($field, 'LIKE', '%' . $sdx . '%');
                }
            });
        }
    }
747777
protected void appendField(final StringBuilder builder, final String key, final int value) {
        if (builder.length() > 0) {
            builder.append("&");
        }
        builder.append(key).append("=").append(value);
    }
348420
void addWhereClause(StringBuilder builder) {
        if (!getKunderaQuery().getFilterClauseQueue().isEmpty()) {
            builder.append(CQLTranslator.ADD_WHERE_CLAUSE);
        }
    }
129386
private ReqlFunction1 parseAndBuildFilters(EntityType entityType, Expression whereExp)
    {
        if (whereExp instanceof ComparisonExpression)
        {
            String left = ((ComparisonExpression) whereExp).getLeftExpression().toActualText();

            String right = ((ComparisonExpression) whereExp).getRightExpression().toActualText();
            right = right.replaceAll("['\"]", "");
            if (right.startsWith(POSITIONAL_PREFIX) || right.startsWith(PARAMETERIZED_PREFIX))
            {
                right = kunderaQuery.getParametersMap().get(right) + "";
            }
            Attribute attribute = entityType.getAttribute(left.split(DOT_REGEX)[1]);
            boolean isId = ((Field) attribute.getJavaMember()).isAnnotationPresent(Id.class);
          
            return buildFunction(isId ? ID : ((AbstractAttribute) attribute).getJPAColumnName(),
                    ConvertUtils.convert(right, attribute.getJavaType()),
                    ((ComparisonExpression) whereExp).getActualIdentifier());
        }
        else
        {
            logger.error("Operation not supported");
            throw new KunderaException("Operation not supported");
        }
    }
685521
public void buildOrderByClause(StringBuilder builder, String field, Object orderType, boolean useToken)
    {
        builder.append(SPACE_STRING);
        builder.append(SORT_CLAUSE);
        builder = ensureCase(builder, field, useToken);
        builder.append(SPACE_STRING);
        builder.append(orderType);
    }
120321
function QueryCompiler(client, builder) {
  this.client = client;
  this.method = builder._method || 'select';
  this.options = builder._options || {};
  this.single = builder._single;
  var grouped = this.grouped = {};
  builder._statements.forEach(function (item) {
    if (!item.grouping) {
      return;
    }
    var val = item.grouping;
    if (!(val in grouped)) {
      grouped[val] = [];
    }
    grouped[val].push(item);
  });
  this.formatter = new Formatter(client);
}
723121
private SelectorBuilderImpl multipleValuePredicate(String field, String[] propertyValues,
      PredicateOperator operator) {
    if (propertyValues == null) {
      return this;
    }

    Predicate predicate = new Predicate();
    predicate.setOperator(operator);
    predicate.setField(field);

    for (String propertyValue : propertyValues) {
      predicate.getValues().add(propertyValue);
    }

    this.predicates.add(predicate);

    return this;
  }
420525
private void buildWhereClause(KunderaQuery kunderaQuery, EntityMetadata metadata, MetamodelImpl metaModel,
        CQLTranslator translator, StringBuilder builder) {
        for (Object clause : kunderaQuery.getFilterClauseQueue()) {
            FilterClause filterClause = (FilterClause) clause;
            Field f = (Field) metaModel.entity(metadata.getEntityClazz())
                .getAttribute(metadata.getFieldName(filterClause.getProperty())).getJavaMember();
            String jpaColumnName = getColumnName(metadata, filterClause.getProperty());

            if (metaModel.isEmbeddable(metadata.getIdAttribute().getBindableJavaType())) {
                Field[] fields = metadata.getIdAttribute().getBindableJavaType().getDeclaredFields();
                EmbeddableType compoundKey = metaModel.embeddable(metadata.getIdAttribute().getBindableJavaType());
                for (Field field : fields) {
                    if (field != null && !Modifier.isStatic(field.getModifiers())
                        && !Modifier.isTransient(field.getModifiers()) && !field.isAnnotationPresent(Transient.class)) {
                        Attribute attribute = compoundKey.getAttribute(field.getName());
                        String columnName = ((AbstractAttribute) attribute).getJPAColumnName();
                        Object value = PropertyAccessorHelper.getObject(filterClause.getValue().get(0), field);
                        // TODO
                        translator.buildWhereClause(builder, field.getType(), columnName, value,
                            filterClause.getCondition(), false);
                    }
                }
            } else {
                translator.buildWhereClause(builder, f.getType(), jpaColumnName, filterClause.getValue().get(0),
                    filterClause.getCondition(), false);
            }
        }
        builder.delete(builder.lastIndexOf(CQLTranslator.AND_CLAUSE), builder.length());
    }
1254465
function (parentBuilder, field) {
    if (!dataUtils.isValidStr(field)) throw "Invalid field, should be a string: " + dataUtils.JSONstringify(field);

    /**
     * Ensures a comparison of the field with the value.
     * @param {string} comparator e.g. "$gt", "$gte", etc.
     * @param {*} value
     * @returns {QueryBuilder} the parent Builder. Use .andField()
     * to chain further with this builder.
     */
    this.is = function (comparator, value) {
        return parentBuilder._compare(field, comparator, value);
    };

    /**
     * Ensures that the field matches the given value. This is same
     * as calling matchAll([value]).
     * @param {*} value
     * @returns {QueryBuilder} the parent Builder. Use .andField()
     * to chain further with this builder.
     */
    this.matches = function (value) {
        return parentBuilder._matchesAll(field, [value]);
    };

    /**
     * Ensures that the field matches all the values.
     * @param {Array.<*>} values
     * @returns {QueryBuilder} the parent Builder. Use .andField()
     * to chain further with this builder.
     */
    this.matchesAll = function (values) {
        return parentBuilder._matchesAll(field, values);
    };

    /**
     * Ensures that the field matches at least one of the values.
     * @param {Array.<*>} values
     * @param {boolean} [addToExistingOr=false] If true, this will
     * be added to the existing OR list ($in), if any.
     * @returns {QueryBuilder} the parent Builder. Use .andField()
     * to chain further with this builder.
     */
    this.matchesAny = function (values, addToExistingOr) {
        return parentBuilder._matchesAny(field, values, addToExistingOr);
    };
}
853795
public function where($key, $operator = null, $value = null): IQueryBuilderHandler
    {
        // If two params are given then assume operator is =
        if (\func_num_args() === 2) {
            $value = $operator;
            $operator = '=';
        }

        if (\is_bool($value) === true) {
            $value = (int)$value;
        }

        return $this->whereHandler($key, $operator, $value);
    }