haskell-neo4j-client-0.3.2.0: A Haskell neo4j client

Safe HaskellNone
LanguageHaskell98

Database.Neo4j.Traversal

Contents

Description

Module to manage traversal operations

Synopsis

Types for configuring the traversal

data Uniqueness Source

Different types of uniqueness calculations for a traversal

Instances

Eq Uniqueness 
Show Uniqueness 
ToJSON (Maybe Uniqueness)

How to codify uniqueness values into JSON

data TraversalOrder Source

Traversal mode

Constructors

BreadthFirst 
DepthFirst 

Instances

Eq TraversalOrder 
Show TraversalOrder 
ToJSON TraversalOrder

How to codify traversalDesc values into JSON

data ReturnFilter Source

Built-in return filters

Instances

Eq ReturnFilter 
Show ReturnFilter 
ToJSON ReturnFilter

How to codify ReturnFilter values into JSON

Additional types for configuring a paged traversal

data TraversalPaging Source

Description of a traversal paging

Types used when returning paths

data ConcreteDirection Source

Direction without possibility of ambiguity

Constructors

In 
Out 

data Path a b Source

Data type to describe a path in a graph, that is a single node or nodes interleaved with relationships

Constructors

PathEnd !a 
PathLink !a !b !(Path a b) 

Instances

FromJSON FullPath

How to decodify an IdPath from JSON

FromJSON IdPath

How to decodify an IdPath from JSON

(Eq a, Eq b) => Eq (Path a b) 
(Ord a, Ord b) => Ord (Path a b) 
(Show a, Show b) => Show (Path a b) 

type IdPath = Path NodePath (RelPath, ConcreteDirection) Source

Path that its data are id's

type FullPath = Path Node Relationship Source

Path that its data are full nodes and relationships, not only their id's

Types used when returning paged results

data PagedTraversal a Source

Data type that holds a result for a paged traversal with the URI to get the rest of the pages

Instances

pathNodes :: Path a b -> [a] Source

Get all the nodes of a path

pathRels :: Path a b -> [b] Source

Get all the relationships of a path

Traversal operations

traverseGetNodes :: NodeIdentifier a => TraversalDesc -> a -> Neo4j [Node] Source

Perform a traversal and get the resulting nodes

traverseGetRels :: NodeIdentifier a => TraversalDesc -> a -> Neo4j [Relationship] Source

Perform a traversal and get the resulting relationship entities

traverseGetPath :: NodeIdentifier a => TraversalDesc -> a -> Neo4j [IdPath] Source

Perform a traversal and get the resulting node and relationship paths IMPORTANT! In pre 2.2 Neo4j versions the directions in each relationship ID returned have a default value (The API does not provide them)

traverseGetFullPath :: NodeIdentifier a => TraversalDesc -> a -> Neo4j [FullPath] Source

Perform a traversal and get the resulting node and relationship entities

Paged traversal operations

pagedTraverseGetNodes :: NodeIdentifier a => TraversalDesc -> TraversalPaging -> a -> Neo4j (PagedTraversal Node) Source

Perform a paged traversal and get the resulting nodes

pagedTraverseGetRels :: NodeIdentifier a => TraversalDesc -> TraversalPaging -> a -> Neo4j (PagedTraversal Relationship) Source

Perform a paged traversal and get the resulting relationships

pagedTraverseGetPath :: NodeIdentifier a => TraversalDesc -> TraversalPaging -> a -> Neo4j (PagedTraversal IdPath) Source

Perform a paged traversal and get the resulting id paths, IMPORTANT! In pre 2.2 Neo4j versions the directions in each relationship ID returned have a default value (The API does not provide them)

pagedTraverseGetFullPath :: NodeIdentifier a => TraversalDesc -> TraversalPaging -> a -> Neo4j (PagedTraversal FullPath) Source

Perform a paged traversal and get the resulting paths with full entities

Operations to handle paged results

getPagedValues :: PagedTraversal a -> [a] Source

Get the values of a paged traversal result

nextTraversalPage :: FromJSON a => PagedTraversal a -> Neo4j (PagedTraversal a) Source

Get the next page of values from a traversal result

pagedTraversalDone :: PagedTraversal a -> Bool Source

Whether a paged traversal is done