On 10/07/12 15:58, Laurent Pellegrino wrote:
Hello,

I am manipulating Query objects and I was wondering if there is an
utility class that transforms directly a SortCondition (retrieved
through Query#getOrderBy()) to its associated Op operator? Same
question for ElementFilter?

Expressions don't need translation - the AST produced by the parser (the E_* classes) is the algebra form.

See

AlgebraGenerator.compileModifiers

Is there something similar to Transformers (provided for algebra
transformation) but for Elements?

There is a visitor pattern but not a transformation pattern on top of that.


Finally, is there a class that can serialize/deserialize SortCondition
and ElementFilter objects?


Otherwise, if I switch to the algebra, is
there a class that can serialize/deserialize any Op?

To and from a Query oor to and from a string?

== serialize/dersialize an Op
as an algebra syntax:

SSE.write
SSE.parseOp


== Query

OpAsQuery does a fairly good job.

1/ It is possible to write algebra expressions for which there is no query
2/ OpAsQuery isn't perfect.


Kind Regards,



Laurent



Reply via email to