Hey,

> Thanks a lot. Updated to 0.8-SNAPSHOT. Strangely maven did not resolve
> groovy dependence automatically. Had to add it by hand.

Huh? Gremlin 0.8-SNAPSHOT uses Groovy 1.7.8 (which was released maybe 1 week 
ago). Gremlin 0.7 was using Groovy 1.7.5. Perhaps something about that was 
making it burp? What do you mean "add it by hand?"

> ScriptEngine approach works fine, Gremlin.compile(expr) does not?

Were you compiling a Pipe or a Gremlin statement? Compile can only be used to 
create a Pipe:
        public static Pipe compile(final String gremlin);
See the first section of: 
https://github.com/tinkerpop/gremlin/wiki/Using-Gremlin-through-Java

If you want to do an arbitrary Gremlin statement, then you use 
GremlinScriptEngine.eval();

?? Or, is it because you haven't linked Groovy into your project. Realize that 
Gremlin class is Gremlin.groovy, not Gremlin.java. Thus, you need to make sure 
you have gmaven-pluggin support in your pom.xml. See the second section of:
        https://github.com/tinkerpop/gremlin/wiki/Using-Gremlin-through-Groovy  

> I understand that it could be faster&cleaner to use groovy, but I need
> to be able to pass string queries and get results back.
> In my use-case this is the definite use of gremlin - arbitrary string
> queries.

Gotcha.

> For "static" business logic I can use Pipes - I'm not
> bothered by the wordy expressions.


Cool. You can get around that by using Gremlin.compile() :P. In that way, you 
can compile a Gremlin statement to get the raw Pipes.

Enjoy,
Marko.

http://markorodriguez.com



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

Reply via email to