hasbolt-extras-0.0.0.15: 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 # 
Instance details

Defined in Database.Bolt.Extras.DSL.Internal.Types

Methods

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

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

Show Cond Source # 
Instance details

Defined in Database.Bolt.Extras.DSL.Internal.Types

Methods

showsPrec :: Int -> Cond -> ShowS #

show :: Cond -> String #

showList :: [Cond] -> ShowS #

ToCypher Cond Source # 
Instance details

Defined in Database.Bolt.Extras.DSL.Internal.Instances

Methods

toCypher :: Cond -> Text Source #

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 # 
Instance details

Defined in Database.Bolt.Extras.DSL.Internal.Types

Methods

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

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

Show Conds Source # 
Instance details

Defined in Database.Bolt.Extras.DSL.Internal.Types

Methods

showsPrec :: Int -> Conds -> ShowS #

show :: Conds -> String #

showList :: [Conds] -> ShowS #

ToCypher Conds Source # 
Instance details

Defined in Database.Bolt.Extras.DSL.Internal.Instances

Methods

toCypher :: Conds -> Text Source #

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

Remove [Text] next

REMOVE query

Return [Text] next

RETURN query

Text Text next

free text query

Instances
Functor Expr Source # 
Instance details

Defined in Database.Bolt.Extras.DSL.Internal.Types

Methods

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

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

Eq next => Eq (Expr next) Source # 
Instance details

Defined in Database.Bolt.Extras.DSL.Internal.Types

Methods

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

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

Show next => Show (Expr next) Source # 
Instance details

Defined in Database.Bolt.Extras.DSL.Internal.Types

Methods

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

show :: Expr next -> String #

showList :: [Expr next] -> ShowS #

(#) :: 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

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

Prepare REMOVE query

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

Prepare RETURN query

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

Prepare query with custom text