On Tue, Dec 6, 2011 at 2:27 PM, jschweigl <johann.schwe...@gmail.com> wrote:

> I have a class with one String field to hold a query string and one for a
> compiled query which is created in the constructor. So, each instance has
> the query string (for documentation purposes) and the compiled query.
>
> Does CypherParser return the same Query instance for parse()'s with
> indentical input strings or is a new one created every time? Or, asked the
> other way round: do I lose any of the advantages of precompiled queries
> when
> I compile the same query string several times at different places in the
> code?
>

There is no query cache in place right now. Once it's in place, you'll get
the same query object every time you parse the same string.

Ah, btw, would be nice if one could ask a compiled Query instance for the
> query source from which it has been compiled ...
>

Of course it should. Why didn't I think of that?

It's been done in the Scala code now. I'll create the Javacompat equivalent
ASAP.

Andrés
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to