hasbolt-extras-0.0.0.3: Extras for hasbolt library

Safe HaskellNone
LanguageHaskell2010

Database.Bolt.Extras.Query

Synopsis

Documentation

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 URelationship 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.

Constructors

NodeGetter 

data PutNode Source #

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

Constructors

BoltId BoltId 
Merge Node 
Create Node 

Instances

data RelGetter Source #

Helper to find URelationships.

Constructors

RelGetter 

class ToCypher a where Source #

The class for convertation into Cypher.

Minimal complete definition

toCypher

Methods

toCypher :: a -> Text Source #

Instances

ToCypher Value Source #

Convertation for Value into Cypher.

Methods

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

Methods

toCypher :: Label -> Text Source #

ToCypher [Property] Source #

Several properties are formatted with concatenation.

Methods

toCypher :: [Property] -> Text Source #

ToCypher [Label] Source #

Several labels are formatted with concatenation.

Methods

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.