Thanks for sharing that. Interesting note about the static imports. that's been such a long standing issue for Gremlin with Groovy. Nice to know there is a way around it.
as for some "suggested improvements" i'd just note the following bits: * in this example: var (name, country) = ['name', 'country'].collect { es.property(it).value() } var (at, event, time) = ['at', 'event', 'time'].collect { swim1.property(it).value() } you could simplify to "value(it)" rather than calling "property(it).value()" * for this example: var recordSetInHeat = g.V().hasLabel('Swim') .filter { it.get().property('event').value().startsWith('Heat') } .values('at').toSet() i think it would be preferable to use Gremlin syntax for the filter: g.V().has('Swim','event', startingWith('Heat')).values('at') On Thu, Sep 12, 2024 at 7:58 AM Paul King <pa...@asert.com.au> wrote: > Hi folks, > > I recently did a blog post highlighting using Groovy with various > property graph database technologies including TinkerPop/Gremlin: > > https://groovy.apache.org/blog/groovy-graph-databases > > I was just going to make two points: > > * Firstly, I noted that when using Groovy 4 and above, we have > improved keyword handling, meaning that you can now static import an > "in" or "as" method. This means you don't need the "__.in()" trick > anymore - though it still works of course. I didn't know if you wanted > that in your documentation. If I get time I can try to create a PR. > > * Secondly, I plan to revise the article shortly. If you have any > suggested improvements, or if there is anything you think I should be > highlighting about TinkerPop, please let me know and I can try to > incorporate details in the revision. Thanks! > > Regards, Paul. >