cassandra.datastax.graph.fluent.query
¶
-
class
cassandra.datastax.graph.fluent.query.
TraversalBatch
(session=None, execution_profile=None)[source]¶ A TraversalBatch is used to execute multiple graph traversals in a single transaction. If any traversal in the batch fails, the entire batch will fail to apply.
If a TraversalBatch is bounded to a DSE session, it can be executed using traversal_batch.execute().
- Parameters
session – (Optional) A DSE session
execution_profile – (Optional) The execution profile to use for the batch execution
-
add
(traversal)[source]¶ Add a traversal to the batch.
- Parameters
traversal – A gremlin GraphTraversal
-
add_all
(traversals)[source]¶ Adds a sequence of traversals to the batch.
- Parameters
traversals – A sequence of gremlin GraphTraversal