module Database.Bolt.Extras.DSL.Internal.Language
(
CypherDSL
, createF
, matchF
, optionalMatchF
, mergeF
, whereF
, setF
, deleteF
, detachDeleteF
, removeF
, returnF
, withF
, textF
) where
import Control.Monad.Free (Free (..), liftF)
import Data.Text (Text)
import Database.Bolt.Extras.DSL.Internal.Types (Conds (..), Expr (..),
Selectors)
type CypherDSL a = Free Expr ()
createF :: Selectors -> Free Expr ()
createF sels = liftF (Create sels ())
matchF :: Selectors -> Free Expr ()
matchF sels = liftF (Match sels ())
optionalMatchF :: Selectors -> Free Expr ()
optionalMatchF sels = liftF (OptionalMatch sels ())
mergeF :: Selectors -> Free Expr ()
mergeF sels = liftF (Merge sels ())
whereF :: Conds -> Free Expr ()
whereF conds = liftF (Where conds ())
setF :: [Text] -> Free Expr ()
setF txts = liftF (Set txts ())
deleteF :: [Text] -> Free Expr ()
deleteF txts = liftF (Delete txts ())
detachDeleteF :: [Text] -> Free Expr ()
detachDeleteF txts = liftF (DetachDelete txts ())
removeF :: [Text] -> Free Expr ()
removeF txts = liftF (Remove txts ())
returnF :: [Text] -> Free Expr ()
returnF txts = liftF (Return txts ())
withF :: [Text] -> Free Expr ()
withF txts = liftF (With txts ())
textF :: Text -> Free Expr ()
textF txt = liftF (Text txt ())