GraphTraversal

lightdb.traverse.GraphTraversal

Primary entry point for graph traversals

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Classlikes

case class StepFunctionTraversal[N <: Document[N]](startIds: Set[Id[N]], step: Id[N] => Task[Set[Id[N]]], maxDepth: Int)

A traversal that uses a step function to find neighbors This provides compatibility with legacy code that used BFSEngine.withStepFunction

A traversal that uses a step function to find neighbors This provides compatibility with legacy code that used BFSEngine.withStepFunction

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def createEdgeStepFunction[E <: EdgeDocument[LazyRef(...), N, N], N <: Document[LazyRef(...)], M <: DocumentModel[E]](tx: PrefixScanningTransaction[E, M]): Id[N] => Task[Set[Id[N]]]

Create a type-safe step function from an edge type This provides a type-safe way to create step functions for tests

Create a type-safe step function from an edge type This provides a type-safe way to create step functions for tests

Value parameters

tx

The transaction to use

Attributes

Returns

A type-safe step function

def from[D <: Document[LazyRef(...)]](id: Id[D]): DocumentTraversalBuilder[D]

Start a traversal from a single document ID

Start a traversal from a single document ID

Attributes

def from[D <: Document[LazyRef(...)]](ids: Set[Id[D]]): DocumentTraversalBuilder[D]

Start a traversal from a set of document IDs

Start a traversal from a set of document IDs

Attributes

def fromStream[D <: Document[LazyRef(...)]](idStream: Stream[Id[D]]): DocumentTraversalBuilder[D]

Start a traversal from a stream of document IDs

Start a traversal from a stream of document IDs

Attributes

def withStepFunction[N <: Document[LazyRef(...)]](startIds: Set[Id[N]], step: Id[N] => Task[Set[Id[N]]], maxDepth: Int): StepFunctionTraversal[N]

Create a traversal using a step function, for compatibility with legacy code

Create a traversal using a step function, for compatibility with legacy code

Value parameters

maxDepth

The maximum traversal depth

startIds

The set of starting node IDs

step

The step function that returns neighbors for a node

Attributes

Returns

A StepFunctionTraversal instance