Re: [Neo] Groovy and Neo4J - A working example

2008-12-12 Thread Guillaume Laforge
You can also do some fun things like: def myNodeName = firstName assert person.${myNodeName} == firstName :-) On Fri, Dec 12, 2008 at 11:41 AM, Mattias Persson matt...@neotechnology.com wrote: Awesome, that takes care of that then, thanks! 2008/12/12 Guillaume Laforge glafo...@gmail.com:

Re: [Neo] Groovy and Neo4J - A working example

2008-12-12 Thread Mattias Persson
Nice, That would actually be my next question :) Cool things indeed. 2008/12/12 Guillaume Laforge glafo...@gmail.com: You can also do some fun things like: def myNodeName = firstName assert person.${myNodeName} == firstName :-) On Fri, Dec 12, 2008 at 11:41 AM, Mattias Persson

Re: [Neo] Groovy and Neo4J - A working example

2008-12-12 Thread Guillaume Laforge
In other niceties, using the with{} closure: person.with { firstName = 'Guillaume' lastName = 'Laforge' } That can be handy too, for avoiding some repetition. On Fri, Dec 12, 2008 at 11:57 AM, Mattias Persson matt...@neotechnology.com wrote: Nice, That would actually be my next

Re: [Neo] Groovy and Neo4J - A working example

2008-12-12 Thread Guillaume Laforge
In Groovy, you can quote method names and properties. So when you have weirdo characters, you can do that instead: myNode.super - funky + node / name = something. On Fri, Dec 12, 2008 at 11:36 AM, Mattias Persson matt...@neotechnology.com wrote: Hmm, this thread is probably dead? But, I

Re: [Neo] Groovy and Neo4J - A working example

2008-12-12 Thread Mattias Persson
Hmm, this thread is probably dead? But, I just thought about the: myNode.name = Mattias myNode.someProperty = Something else Keep in mind that property keys have no restrictions as to length or content which means a property key can contain spaces and '=' characters and what not. f.ex.

[Neo] Groovy and Neo4J - A working example

2008-12-07 Thread Stig Lau
I've tossed up a demo of Neo4J vs Groovy which shows Neo4J running in Groovy with the help of some Maven magic. Sadly nough, I didn't get Guillaume's propositions working, so I'm leaving the ball over to the guys who know Groovy a little better than me. The project is packaged as a Maven