hasbolt-extras-0.0.0.11: Extras for hasbolt library

Safe HaskellNone
LanguageHaskell2010

Database.Bolt.Extras.DSL

Synopsis

Documentation

data PathPart Source #

Selector for paths.

Constructors

RelSelector :!->: NodeSelector infixl 2

directed relation

RelSelector :!-: NodeSelector infixl 2

not directed relation

data PathSelector Source #

Constructors

PathSelector :-!: PathPart infixl 1

not directed relation

PathSelector :<-!: PathPart infixl 1

directed relation

P NodeSelector

starting node of Path

data Selector Source #

Constructors

PS PathSelector

path selector

TS Text

free text selector

data Cond Source #

Conditions.

Constructors

ID Text BoltId

ID(txt) = boltId

IDs Text [BoltId]

ID(txt) IN [boltId1, boltId2, ... ]

IN Text [Text]

txt IN [txt1, txt2, ... ]

TC Text

free text condition

Instances

Eq Cond Source # 

Methods

(==) :: Cond -> Cond -> Bool #

(/=) :: Cond -> Cond -> Bool #

Show Cond Source # 

Methods

showsPrec :: Int -> Cond -> ShowS #

show :: Cond -> String #

showList :: [Cond] -> ShowS #

data Conds Source #

Constructors

Conds :&&: Conds infixr 3

condition AND condition

Conds :||: Conds infixr 2

condition OR condition

C Cond

single condition

Not Conds

NOT condition

Instances

Eq Conds Source # 

Methods

(==) :: Conds -> Conds -> Bool #

(/=) :: Conds -> Conds -> Bool #

Show Conds Source # 

Methods

showsPrec :: Int -> Conds -> ShowS #

show :: Conds -> String #

showList :: [Conds] -> ShowS #

data Expr next Source #

Expression in Cypher language.

Constructors

Create Selectors next

CREATE query

Match Selectors next

MATCH query

OptionalMatch Selectors next

OPTIONAL MATCH query

Merge Selectors next

MERGE query

Where Conds next

WHERE query

Set [Text] next

SET query

Delete [Text] next

DELETE query

DetachDelete [Text] next

DETACH DELETE query

Return [Text] next

RETURN query

Text Text next

free text query

Instances

Functor Expr Source # 

Methods

fmap :: (a -> b) -> Expr a -> Expr b #

(<$) :: a -> Expr b -> Expr a #

Eq next => Eq (Expr next) Source # 

Methods

(==) :: Expr next -> Expr next -> Bool #

(/=) :: Expr next -> Expr next -> Bool #

Show next => Show (Expr next) Source # 

Methods

showsPrec :: Int -> Expr next -> ShowS #

show :: Expr next -> String #

showList :: [Expr next] -> ShowS #

class SelectorLike a where Source #

Class for Selectors, which can update identifier, labels and props.

Minimal complete definition

withIdentifier, withLabel, withProp

Methods

withIdentifier :: Text -> a -> a Source #

withLabel :: Text -> a -> a Source #

withProp :: (Text, Value) -> a -> a Source #

(#) :: a -> (a -> b) -> b Source #

createF :: Selectors -> Free Expr () Source #

Prepare CREATE query

matchF :: Selectors -> Free Expr () Source #

Prepare MATCH query

optionalMatchF :: Selectors -> Free Expr () Source #

Prepare 'OPTIONAL MATCH' query

mergeF :: Selectors -> Free Expr () Source #

Prepare MERGE query

whereF :: Conds -> Free Expr () Source #

Prepare WHERE query

setF :: [Text] -> Free Expr () Source #

Prepare SET query

deleteF :: [Text] -> Free Expr () Source #

Prepare DELETE query

detachDeleteF :: [Text] -> Free Expr () Source #

Prepare 'DETACH DELETE' query

returnF :: [Text] -> Free Expr () Source #

Prepare RETURN query

textF :: Text -> Free Expr () Source #

Prepare query with custom text