Safe Haskell | None |
---|---|
Language | Haskell2010 |
Database.Orchestrate.Graph
Description
This module implements the Graph API.
- getRel :: (OrchestrateData a, FromJSON b) => a -> RelKind -> [RelKind] -> OrchestrateIO (RelList a b)
- createRel :: (OrchestrateData a, OrchestrateData b) => a -> RelKind -> b -> OrchestrateIO ()
- deleteRel :: (OrchestrateData a, OrchestrateData b) => a -> RelKind -> b -> OrchestrateIO ()
Documentation
Arguments
:: (OrchestrateData a, FromJSON b) | |
=> a | The originating node. |
-> RelKind | The first edge to traverse. |
-> [RelKind] | Any additional edges to traverse. |
-> OrchestrateIO (RelList a b) | A list of nodes originating from |
This retrieves a list of target nodes from edges originating from a
.
For more information see the API documentation.
If the third parameter is not empty, it represents additional edges that will be traversed to get to the target.
For example:
getRel data "friend" ["last_name"]
Arguments
:: (OrchestrateData a, OrchestrateData b) | |
=> a | The originating node. |
-> RelKind | The label for the edge. |
-> b | The target, destination node. |
-> OrchestrateIO () |
Creates a relationship (an edge) between two nodes. The edge has
a RelKind
type. See the API documentation
for more information.
For example:
createRel start "parent" child
Arguments
:: (OrchestrateData a, OrchestrateData b) | |
=> a | The originating node. |
-> RelKind | The label for the edge. |
-> b | The target, destination node. |
-> OrchestrateIO () |
This removes a relationship (an edge) between two nodes.
For example:
deleteRel start "parent" child