public class DseGraph extends Object
Modifier and Type | Field and Description |
---|---|
static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource |
g
IMPORTANT: As of Tinkerpop 3.3.5, you should no longer use this shortcut if you intend
to connect the traversal to DSE Graph using a remote connection, for example
via the
remoteConnectionBuilder(com.datastax.oss.driver.api.core.CqlSession) method declared below. |
Modifier and Type | Method and Description |
---|---|
static DseGraphRemoteConnectionBuilder |
remoteConnectionBuilder(CqlSession dseSession)
Returns a builder helper class to help create
RemoteConnection implementations that seamlessly
connect to DSE Graph using the CqlSession in parameter. |
public static final org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource g
remoteConnectionBuilder(com.datastax.oss.driver.api.core.CqlSession)
method declared below. Instead of:
DseSession session = ...;
RemoteConnection remoteConnection = DseGraph.remoteConnectionBuilder(session).build();
GraphTraversalSource g = DseGraph.g.withRemote(remoteConnection);
You should now use AnonymousTraversalSource.traversal()
, and adopt the following idiom:
DseSession session = ...;
RemoteConnection remoteConnection = DseGraph.remoteConnectionBuilder(session).build();
GraphTraversalSource g = AnonymousTraversalSource.traversal().withRemote(remoteConnection);
A general-purpose shortcut for a non-connected TinkerPop GraphTraversalSource
based on an immutable empty graph. This is really just a shortcut to EmptyGraph.instance().traversal();
.
It can be used to create FluentGraphStatement
instances (recommended); for ease of
use you may statically import this variable.
Calling g.getGraph()
will return a local immutable empty graph which is in no way
connected to the DSE Graph server, it will not allow to modify a DSE Graph directly. To act on
data stored in DSE Graph you must use traversals such as
DseGraph.g.V()
, DseGraph.g.addV/addE()
.
public static DseGraphRemoteConnectionBuilder remoteConnectionBuilder(CqlSession dseSession)
RemoteConnection
implementations that seamlessly
connect to DSE Graph using the CqlSession
in parameter.Copyright © 2017–2024. All rights reserved.