Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type GraphGetRequest = Graph NodeName NodeGetter RelGetter
- type GraphGetResponse = Graph NodeName Node URelationship
- type GraphPutRequest = Graph NodeName PutNode URelationship
- type GraphPutResponse = Graph NodeName BoltId BoltId
- data NodeGetter = NodeGetter {}
- type NodeName = Text
- data PutNode
- data RelGetter = RelGetter {}
- class ToCypher a where
- getGraph :: MonadIO m => [Text] -> GraphGetRequest -> BoltActionT m [GraphGetResponse]
- putGraph :: MonadIO m => GraphPutRequest -> BoltActionT m GraphPutResponse
Documentation
type GraphGetRequest = Graph NodeName NodeGetter RelGetter Source #
The combinations of Getters to load graph from the database.
data NodeGetter Source #
Helper to find Node
s.
_varQNName is the mark for this Node, which will be used in Cypher queries.
For example "MATCH(a)", here _varQNName = "a"
RelGetter is used for searching using indexes of Node
s in the given graph.
class ToCypher a where Source #
The class for convertation into Cypher.
ToCypher Value Source # | Convertation for |
ToCypher Property Source # | Converts property with |
ToCypher Label Source # | Label with |
ToCypher [Property] Source # | Several properties are formatted with concatenation. |
ToCypher [Label] Source # | Several labels are formatted with concatenation. |
getGraph :: MonadIO m => [Text] -> GraphGetRequest -> BoltActionT m [GraphGetResponse] Source #
For the given GraphGetRequest find the graph, which matches it. This function creates single cypher query and performs it.
putGraph :: MonadIO m => GraphPutRequest -> BoltActionT m GraphPutResponse Source #
Create Graph using given GraphU and the list describing Node
s indices (from the given _vertices),
which should be connected by the corresponding Relationship
.
If there were multiple choices while merging given _vertices, the first match is used for connection.