hasbolt-0.1.3.0: Haskell driver for Neo4j 3+ (BOLT protocol)

Safe HaskellNone
LanguageHaskell2010

Database.Bolt

Synopsis

Documentation

type BoltActionT = ReaderT Pipe #

Monad Transformer to do all BOLT actions in

connect :: MonadIO m => BoltCfg -> m Pipe #

Creates new Pipe instance to use all requests through

close :: MonadIO m => Pipe -> m () #

Closes Pipe

reset :: MonadIO m => Pipe -> m () #

Resets current sessions

run :: Pipe -> BoltActionT m a -> m a #

Runs BOLT action on selected pipe

queryP :: MonadIO m => Text -> Map Text Value -> BoltActionT m [Record] #

Runs Cypher query with parameters and returns list of obtained Records. Strict version

query :: MonadIO m => Text -> BoltActionT m [Record] #

Runs Cypher query and returns list of obtained Records. Strict version

queryP_ :: MonadIO m => Text -> Map Text Value -> BoltActionT m () #

Runs Cypher query with parameters and ignores response

query_ :: MonadIO m => Text -> BoltActionT m () #

Runs Cypher query and ignores response

data Pipe #

data BoltCfg #

Configuration of driver connection

Constructors

BoltCfg 

Fields

Instances

class BoltValue a where #

The BoltValue class describes values, that can be packed and unpacked for BOLT protocol.

Minimal complete definition

pack, unpackT

Methods

pack :: a -> ByteString #

Packs a value to ByteString

unpackT :: Monad m => UnpackT m a #

Unpacks in a State monad to get values from single ByteString

unpack :: Monad m => ByteString -> m a #

Unpacks a ByteString to selected value

data Value #

The Value datatype generalizes all primitive BoltValues

Constructors

N () 
B Bool 
I Int 
F Double 
T Text 
L [Value] 
M (Map Text Value) 
S Structure 

Instances

Eq Value # 

Methods

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

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

Show Value # 

Methods

showsPrec :: Int -> Value -> ShowS #

show :: Value -> String #

showList :: [Value] -> ShowS #

RecordValue (Map Text Value) # 

Methods

exact :: Monad m => Value -> m (Map Text Value) #

data Structure #

The Structure datatype describes Neo4j structure for BOLT protocol

Constructors

Structure 

Fields

type Record = Map Text Value #

Result type for query requests

class RecordValue a where #

Get exact type from Value

Minimal complete definition

exact

Methods

exact :: Monad m => Value -> m a #

Instances

RecordValue Bool # 

Methods

exact :: Monad m => Value -> m Bool #

RecordValue Double # 

Methods

exact :: Monad m => Value -> m Double #

RecordValue Int # 

Methods

exact :: Monad m => Value -> m Int #

RecordValue () # 

Methods

exact :: Monad m => Value -> m () #

RecordValue Text # 

Methods

exact :: Monad m => Value -> m Text #

RecordValue Path # 

Methods

exact :: Monad m => Value -> m Path #

RecordValue URelationship # 

Methods

exact :: Monad m => Value -> m URelationship #

RecordValue Relationship # 

Methods

exact :: Monad m => Value -> m Relationship #

RecordValue Node # 

Methods

exact :: Monad m => Value -> m Node #

RecordValue a => RecordValue [a] # 

Methods

exact :: Monad m => Value -> m [a] #

RecordValue a => RecordValue (Maybe a) # 

Methods

exact :: Monad m => Value -> m (Maybe a) #

RecordValue (Map Text Value) # 

Methods

exact :: Monad m => Value -> m (Map Text Value) #

at :: Monad m => Record -> Text -> m Value #

data Node #

Constructors

Node 

Fields

Instances

Eq Node # 

Methods

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

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

Show Node # 

Methods

showsPrec :: Int -> Node -> ShowS #

show :: Node -> String #

showList :: [Node] -> ShowS #

RecordValue Node # 

Methods

exact :: Monad m => Value -> m Node #

data Relationship #

Constructors

Relationship 

Fields

data URelationship #

Constructors

URelationship 

Fields

data Path #

Constructors

Path 

Fields

Instances

Eq Path # 

Methods

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

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

Show Path # 

Methods

showsPrec :: Int -> Path -> ShowS #

show :: Path -> String #

showList :: [Path] -> ShowS #

RecordValue Path # 

Methods

exact :: Monad m => Value -> m Path #