Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data BoltActionT m a
- data BoltError
- data UnpackError
- connect :: MonadIO m => HasCallStack => BoltCfg -> m Pipe
- close :: MonadIO m => HasCallStack => Pipe -> m ()
- reset :: MonadIO m => HasCallStack => Pipe -> m ()
- run :: MonadIO m => HasCallStack => Pipe -> BoltActionT m a -> m a
- runE :: MonadIO m => HasCallStack => Pipe -> BoltActionT m a -> m (Either BoltError a)
- queryP :: MonadIO m => HasCallStack => Text -> Map Text Value -> BoltActionT m [Record]
- query :: MonadIO m => HasCallStack => Text -> BoltActionT m [Record]
- queryP_ :: MonadIO m => HasCallStack => Text -> Map Text Value -> BoltActionT m ()
- query_ :: MonadIO m => HasCallStack => Text -> BoltActionT m ()
- transact :: MonadIO m => BoltActionT m a -> BoltActionT m a
- (=:) :: IsValue a => Text -> a -> (Text, Value)
- props :: [(Text, Value)] -> Map Text Value
- data Pipe
- data BoltCfg = BoltCfg {}
- data Value
- class IsValue a where
- toValue :: a -> Value
- toValueList :: [a] -> Value
- data Structure = Structure {}
- type Record = Map Text Value
- class RecordValue a where
- exactEither :: Value -> Either UnpackError a
- exact :: (MonadError UnpackError m, RecordValue a) => Value -> m a
- exactMaybe :: RecordValue a => Value -> Maybe a
- at :: (Monad m, RecordValue a) => Record -> Text -> BoltActionT m a
- data Node = Node {}
- data Relationship = Relationship {}
- data URelationship = URelationship {}
- data Path = Path {
- pathNodes :: [Node]
- pathRelationships :: [URelationship]
- pathSequence :: [Int]
Documentation
data BoltActionT m a Source #
Monad Transformer to do all BOLT actions in
Instances
Error that can appear during BoltActionT
manipulations
Instances
Show BoltError Source # | |
Exception BoltError Source # | |
Defined in Database.Bolt.Connection.Type toException :: BoltError -> SomeException # fromException :: SomeException -> Maybe BoltError # displayException :: BoltError -> String # | |
Monad m => MonadError BoltError (BoltActionT m) Source # | |
Defined in Database.Bolt.Connection.Type throwError :: BoltError -> BoltActionT m a # catchError :: BoltActionT m a -> (BoltError -> BoltActionT m a) -> BoltActionT m a # |
data UnpackError Source #
Error during unpack process
Instances
Eq UnpackError Source # | |
Defined in Database.Bolt.Value.Type (==) :: UnpackError -> UnpackError -> Bool # (/=) :: UnpackError -> UnpackError -> Bool # | |
Ord UnpackError Source # | |
Defined in Database.Bolt.Value.Type compare :: UnpackError -> UnpackError -> Ordering # (<) :: UnpackError -> UnpackError -> Bool # (<=) :: UnpackError -> UnpackError -> Bool # (>) :: UnpackError -> UnpackError -> Bool # (>=) :: UnpackError -> UnpackError -> Bool # max :: UnpackError -> UnpackError -> UnpackError # min :: UnpackError -> UnpackError -> UnpackError # | |
Show UnpackError Source # | |
Defined in Database.Bolt.Value.Type showsPrec :: Int -> UnpackError -> ShowS # show :: UnpackError -> String # showList :: [UnpackError] -> ShowS # | |
Monad m => MonadError UnpackError (UnpackT m) Source # | |
Defined in Database.Bolt.Value.Type throwError :: UnpackError -> UnpackT m a # catchError :: UnpackT m a -> (UnpackError -> UnpackT m a) -> UnpackT m a # |
connect :: MonadIO m => HasCallStack => BoltCfg -> m Pipe Source #
Creates new Pipe
instance to use all requests through
run :: MonadIO m => HasCallStack => Pipe -> BoltActionT m a -> m a Source #
Runs BOLT action on selected pipe (with errors throw)
runE :: MonadIO m => HasCallStack => Pipe -> BoltActionT m a -> m (Either BoltError a) Source #
Runs BOLT action on selected pipe
queryP :: MonadIO m => HasCallStack => Text -> Map Text Value -> BoltActionT m [Record] Source #
Runs Cypher query with parameters and returns list of obtained Record
s. Lazy version
query :: MonadIO m => HasCallStack => Text -> BoltActionT m [Record] Source #
Runs Cypher query and returns list of obtained Record
s. Lazy version
queryP_ :: MonadIO m => HasCallStack => Text -> Map Text Value -> BoltActionT m () Source #
Runs Cypher query with parameters and ignores response
query_ :: MonadIO m => HasCallStack => Text -> BoltActionT m () Source #
Runs Cypher query and ignores response
transact :: MonadIO m => BoltActionT m a -> BoltActionT m a Source #
Runs a sequence of actions as transaction. All queries would be rolled back in case of any exception inside the block.
Instances
Monad m => MonadReader Pipe (BoltActionT m) Source # | |
Defined in Database.Bolt.Connection.Type ask :: BoltActionT m Pipe # local :: (Pipe -> Pipe) -> BoltActionT m a -> BoltActionT m a # reader :: (Pipe -> a) -> BoltActionT m a # |
Configuration of driver connection
BoltCfg | |
|
Instances
Eq Value Source # | |
Show Value Source # | |
BoltValue Value Source # | |
RecordValue Value Source # | |
Defined in Database.Bolt.Record exactEither :: Value -> Either UnpackError Value Source # | |
IsValue (Map Text Value) Source # | |
RecordValue (Map Text Value) Source # | |
Defined in Database.Bolt.Record exactEither :: Value -> Either UnpackError (Map Text Value) Source # |
class IsValue a where Source #
Every datatype that can be represented as BOLT protocol value
toValue :: a -> Value Source #
Wraps value with Value
constructor
toValueList :: [a] -> Value Source #
How to represent a list of values
Instances
IsValue Bool Source # | |
IsValue Char Source # | |
IsValue Double Source # | |
IsValue Float Source # | |
IsValue Int Source # | |
IsValue Integer Source # | |
IsValue () Source # | |
Defined in Database.Bolt.Value.Type | |
IsValue Text Source # | |
IsValue a => IsValue [a] Source # | |
Defined in Database.Bolt.Value.Type | |
IsValue (Map Text Value) Source # | |
The Structure
datatype describes Neo4j structure for BOLT protocol
class RecordValue a where Source #
Get exact type from Value
exactEither :: Value -> Either UnpackError a Source #
Instances
exact :: (MonadError UnpackError m, RecordValue a) => Value -> m a Source #
exactMaybe :: RecordValue a => Value -> Maybe a Source #
at :: (Monad m, RecordValue a) => Record -> Text -> BoltActionT m a Source #
Gets result from obtained record
Instances
Eq Node Source # | |
Show Node Source # | |
FromStructure Node Source # | |
Defined in Database.Bolt.Value.Instances fromStructure :: MonadError UnpackError m => Structure -> m Node Source # | |
RecordValue Node Source # | |
Defined in Database.Bolt.Record exactEither :: Value -> Either UnpackError Node Source # |
data Relationship Source #
Instances
Eq Relationship Source # | |
Defined in Database.Bolt.Value.Type (==) :: Relationship -> Relationship -> Bool # (/=) :: Relationship -> Relationship -> Bool # | |
Show Relationship Source # | |
Defined in Database.Bolt.Value.Type showsPrec :: Int -> Relationship -> ShowS # show :: Relationship -> String # showList :: [Relationship] -> ShowS # | |
FromStructure Relationship Source # | |
Defined in Database.Bolt.Value.Instances fromStructure :: MonadError UnpackError m => Structure -> m Relationship Source # | |
RecordValue Relationship Source # | |
Defined in Database.Bolt.Record |
data URelationship Source #
Instances
Eq URelationship Source # | |
Defined in Database.Bolt.Value.Type (==) :: URelationship -> URelationship -> Bool # (/=) :: URelationship -> URelationship -> Bool # | |
Show URelationship Source # | |
Defined in Database.Bolt.Value.Type showsPrec :: Int -> URelationship -> ShowS # show :: URelationship -> String # showList :: [URelationship] -> ShowS # | |
FromStructure URelationship Source # | |
Defined in Database.Bolt.Value.Instances fromStructure :: MonadError UnpackError m => Structure -> m URelationship Source # | |
RecordValue URelationship Source # | |
Defined in Database.Bolt.Record |
Path | |
|
Instances
Eq Path Source # | |
Show Path Source # | |
FromStructure Path Source # | |
Defined in Database.Bolt.Value.Instances fromStructure :: MonadError UnpackError m => Structure -> m Path Source # | |
RecordValue Path Source # | |
Defined in Database.Bolt.Record exactEither :: Value -> Either UnpackError Path Source # |