jbmusso / grex

JavaScript graph database client for TinkerPop2 Rexster
MIT License
46 stars 12 forks source link

Automatically instantiate GremlinScript when calling .exec() or .fetch() #36

Closed jbmusso closed 10 years ago

jbmusso commented 10 years ago

gRex currently requires passing an instance of GremlinScript to client.exec() or client.fetch(). These two methods should be able to instantiate a new script themselves.

This will make the API smaller for one line scripts, which are typical for simple queries/traversals.

The following:

client.exec(gremlin(g.V())).done(...);

may then be replaced by:

client.exec(g.V()).done(function(res) {