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

Safe HaskellNone
LanguageHaskell2010

Database.Bolt.Lazy

Synopsis

Documentation

type BoltActionT = ReaderT Pipe Source #

Monad Transformer to do all BOLT actions in

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

Creates new Pipe instance to use all requests through

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

Closes Pipe

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

Resets current sessions

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

Runs BOLT action on selected pipe

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

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

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

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

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

Runs Cypher query with parameters and ignores response

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

Runs Cypher query and ignores response

data BoltCfg Source #

Configuration of driver connection

Constructors

BoltCfg 

Fields

Instances

class BoltValue a where Source #

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

Minimal complete definition

pack, unpackT

Methods

pack :: a -> ByteString Source #

Packs a value to ByteString

unpackT :: Monad m => UnpackT m a Source #

Unpacks in a State monad to get values from single ByteString

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

Unpacks a ByteString to selected value

data Value Source #

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

data Structure Source #

The Structure datatype describes Neo4j structure for BOLT protocol

Constructors

Structure 

Fields

type Record = Map Text Value Source #

Result type for query requests

class RecordValue a where Source #

Get exact type from Value

Minimal complete definition

exact

Methods

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

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

data Node Source #

Constructors

Node 

Fields

Instances

Eq Node Source # 

Methods

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

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

Show Node Source # 

Methods

showsPrec :: Int -> Node -> ShowS #

show :: Node -> String #

showList :: [Node] -> ShowS #

RecordValue Node Source # 

Methods

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

data Relationship Source #

Constructors

Relationship 

Fields

data URelationship Source #

Constructors

URelationship 

Fields

data Path Source #

Constructors

Path 

Fields

Instances

Eq Path Source # 

Methods

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

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

Show Path Source # 

Methods

showsPrec :: Int -> Path -> ShowS #

show :: Path -> String #

showList :: [Path] -> ShowS #

RecordValue Path Source # 

Methods

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