hasbolt-extras-0.0.0.8: Extras for hasbolt library

Safe HaskellNone
LanguageHaskell2010

Database.Bolt.Extras.DSL

Synopsis

Documentation

data PathPart Source #

Selector for paths.

Constructors

RelSelector :!->: NodeSelector infixl 2 
RelSelector :!-: NodeSelector infixl 2 

type Cond = [Text] Source #

data Expr next Source #

Expression in Cypher language.

Constructors

Create Selectors next 
Match Selectors next 
OptionalMatch Selectors next 
Merge Selectors next 
Where Cond next 
Set [Text] next 
Delete [Text] next 
DetachDelete [Text] next 
Return [Text] next 
Text Text next 

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 :: Cond -> 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