hasbolt-extras- Extras for hasbolt library

Safe HaskellNone




type GraphGetRequest = Graph NodeName NodeGetter RelGetter Source #

The combinations of Getters to load graph from the database.

type GraphGetResponse = Graph NodeName Node URelationship Source #

The graph of Nodes and URelationships which we got from the database using GraphGetRequest.

type GraphPutRequest = Graph NodeName PutNode PutRelationship Source #

The graph of Nodes with specified uploading type and URelationships.

type GraphPutResponse = Graph NodeName BoltId BoltId Source #

The graph of BoltIds corresponding to the nodes and relationships which we get after putting GraphPutRequest.

data NodeGetter Source #

Helper to find Nodes.



data PutNode Source #

PutNode is the wrapper for Node where we can specify if we want to merge or create it.


data PutRelationship Source #

PutRelationship is the wrapper for Relationship where we can specify if we want to merge or create it.

data RelGetter Source #

Helper to find URelationships.



class ToCypher a where Source #

The class for convertation into Cypher.

Minimal complete definition



toCypher :: a -> Text Source #


ToCypher Value Source #

Convertation for Value into Cypher.


toCypher :: Value -> Text Source #

ToCypher Property Source #

Converts property with name and value to name:value.

ToCypher Label Source #

Label with name are formatted into :name


toCypher :: Label -> Text Source #

ToCypher [Property] Source #

Several properties are formatted with concatenation.


toCypher :: [Property] -> Text Source #

ToCypher [Label] Source #

Several labels are formatted with concatenation.


toCypher :: [Label] -> Text Source #

getGraph :: MonadIO m => [Text] -> GraphGetRequest -> BoltActionT m [GraphGetResponse] Source #

For the given GraphGetRequest find all graphs, which match it. This function creates single cypher query and performs it.

putGraph :: MonadIO m => GraphPutRequest -> BoltActionT m GraphPutResponse Source #

Creates graph using given GraphPutRequest. If there were multiple choices while merging given _vertices, the first match is used for connection.

setNode :: MonadIO m => NodeGetter -> [Property] -> BoltActionT m BoltId Source #

setNode updates properties for the node, corresponding to the given NodeGetter.

deleteNodes :: MonadIO m => [BoltId] -> BoltActionT m [BoltId] Source #

deleteNodes is used to delete all nodes with given BoltIds and all corresponding relatioships.