Support for bind parameter in Fluent API

3 views
Skip to first unread message

Raghavendar T S

unread,
Oct 12, 2019, 5:22:58 AM10/12/19
to DataStax Node.js Driver for Apache Cassandra Mailing List
Hi

Is there a way to build the query traversal with bind parameters?

Thanks in Advance.

Jorge Bay Gondra

unread,
Oct 16, 2019, 7:17:30 AM10/16/19
to nodejs-dr...@lists.datastax.com
Hi,
Are you using dse-graph package?

If so, you can specify parameters when building the traversal:

const key = 'john';
const names = await g.V().has('key', key).out('friends').values('name').toList();

Using TinkerPop traversal API, there's currently no way to build the traversal once and reuse it binding different parameters. The recommended way is to build a new traversal each time from the GraphTraversalSource (reusing the GraphTraversalSource instance across your application but not the GraphTraversal).

Thanks,
Jorge



--
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs-driver-u...@lists.datastax.com.
Reply all
Reply to author
Forward
0 new messages