>>> from bulbs.rexster import Graph, DEBUG>>> g = Graph()>>> g.config.server_scripts = True>>> g.config.set_logger(DEBUG)>>> james = g.vertices.create(name="James")POST url: http://localhost:8182/graphs/emptygraph/verticesPOST body: {"name":"James"}>>> julie = g.vertices.create(name="Julie")POST url: http://localhost:8182/graphs/emptygraph/verticesPOST body: {"name":"Julie"}>>> g.edges.create(james, "knows", julie)POST url: http://localhost:8182/graphs/emptygraph/edgesPOST body: {"_label":"knows","_outV":471,"_inV":472}<Edge: http://localhost:8182/graphs/emptygraph/edges/473>>>> james.outV("knows")POST url: http://localhost:8182/graphs/emptygraph/tp/gremlinPOST body: {"load":["gremlin"],"params":{"start":null,"_id":471,"limit":null,"label":"knows"},"script":"outV(_id, label, start, limit)"}<generator object <genexpr> at 0x1de4140>The "script" value is set to outV's Gremlin method signature defined here:
https://github.com/espeed/bulbs/blob/master/bulbs/gremlin.groovy#L72
The "params" value corresponds to the method signature, but it doesn't differ when config.server_scripts is set to True.
The "load" value contains a list of the server-side groovy file names required by the method, sans the .groovy extensions:
https://github.com/espeed/bulbs/blob/master/bulbs/rexster/client.py#L355
Like Rexster, Bulbs uses the first part of the Groovy filename as a namespace.
For example, methods defined in gremlin.groovy files are added to the Bulbs "gremlin" namespace.
All of Bulbs' pre-defined Gremlin scripts are defined in "gremlin.groovy" files and thus "gremlin" is the default namespace:
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.