Exemplo n.º 1
0
 /**
  * Execute the Cypher query with provided parameters and get the result set as a {@link
  * Neo4jTraversal}.
  *
  * @param query the Cypher query to execute
  * @param parameters the parameters of the Cypher query
  * @return a fluent Gremlin traversal
  */
 public Neo4jTraversal cypher(final String query, final Map<String, Object> parameters) {
   this.tx().readWrite();
   final Neo4jTraversal traversal = Neo4jTraversal.of(this);
   traversal.addStep(
       new StartStep(
           traversal,
           new Neo4jCypherIterator(this.cypher.execute(query, parameters).iterator(), this)));
   return traversal;
 }
Exemplo n.º 2
0
 @Override
 public <S> Neo4jTraversal<S, S> of() {
   final Neo4jTraversal<S, S> traversal = Neo4jTraversal.of(this);
   traversal.addStep(new StartStep<>(traversal));
   return traversal;
 }