class SqlValueVisitor extends ExpressionVisitor (View source)

Extract the values from a criteria/expression

Methods

void
walkComparison(Comparison $comparison)

Converts a comparison expression into the target query language output.

void
walkCompositeExpression(CompositeExpression $expr)

Converts a composite expression into the target query language output.

mixed
walkValue(Value $value)

Converts a value expression into the target query language part.

array
getParamsAndTypes()

Returns the Parameters and Types necessary for matching the last visited expression.

mixed
getValueFromComparison(Comparison $comparison)

Returns the value from a Comparison. In case of a CONTAINS comparison, the value is wrapped in %-signs, because it will be used in a LIKE clause.

Details

void walkComparison(Comparison $comparison)

Converts a comparison expression into the target query language output.

Parameters

Comparison $comparison

Return Value

void

void walkCompositeExpression(CompositeExpression $expr)

Converts a composite expression into the target query language output.

Parameters

CompositeExpression $expr

Return Value

void

mixed walkValue(Value $value)

Converts a value expression into the target query language part.

Parameters

Value $value

Return Value

mixed

array getParamsAndTypes()

Returns the Parameters and Types necessary for matching the last visited expression.

Return Value

array

protected mixed getValueFromComparison(Comparison $comparison)

Returns the value from a Comparison. In case of a CONTAINS comparison, the value is wrapped in %-signs, because it will be used in a LIKE clause.

Parameters

Comparison $comparison

Return Value

mixed