Good day.

This proposal is an extension of my previous proposal of implicit
conversion of a service call to a method call according to its registered
name.

Currently, Gremlin Script supports the creation of instances of certain
classes.
So I propose to extend it to allow to creation of instances of classes that
are provided by AbstractGremlinPlugin implementation.

During the application start, the public constructors plus all static
public methods that are annotated with the annotation `@FactoryMethod` are
registered in the ANTLR-based script engine.

Names of extension classes should start with an upper case, and they are
allowed only as args of the steps. Instances of extension classes or calls
to factory methods can contain instances of other extension classes in a
recursive manner.

This will allow queries like `g.V().hasLabel("PGVector").has("embedding",
PGVectorPredicate.l1Distance(PGVector(,,,), 5))`.

I believe that these mechanics, alongside the mechanics of exposing
services as method calls, will provide all the means necessary for
extending Gremlin by providers, though they will be bound to change some of
their DSL to follow a unified approach.

WDYT?

Reply via email to