-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskell driver for Neo4j 3+ (BOLT protocol) -- -- Haskell driver for Neo4j 3+ (BOLT protocol). -- -- The package covers: -- -- -- -- The code was tested with neo4j versions 3.0 — 3.4 and GrapheneDB -- service @package hasbolt @version 0.1.3.2 module Database.Bolt -- | Monad Transformer to do all BOLT actions in type BoltActionT = ReaderT Pipe -- | Creates new Pipe instance to use all requests through connect :: MonadIO m => BoltCfg -> m Pipe -- | Closes Pipe close :: MonadIO m => Pipe -> m () -- | Resets current sessions reset :: MonadIO m => Pipe -> m () -- | Runs BOLT action on selected pipe run :: Pipe -> BoltActionT m a -> m a -- | Runs Cypher query with parameters and returns list of obtained -- Records. Strict version queryP :: MonadIO m => Text -> Map Text Value -> BoltActionT m [Record] -- | Runs Cypher query and returns list of obtained Records. Strict -- version query :: MonadIO m => Text -> BoltActionT m [Record] -- | Runs Cypher query with parameters and ignores response queryP_ :: MonadIO m => Text -> Map Text Value -> BoltActionT m () -- | Runs Cypher query and ignores response query_ :: MonadIO m => Text -> BoltActionT m () data Pipe -- | Configuration of driver connection data BoltCfg BoltCfg :: Word32 -> Word32 -> Text -> Word16 -> Int -> String -> Int -> Text -> Text -> Bool -> BoltCfg -- | '6060B017' value [magic] :: BoltCfg -> Word32 -- | '00000001' value [version] :: BoltCfg -> Word32 -- | Driver user agent [userAgent] :: BoltCfg -> Text -- | Maximum chunk size of request [maxChunkSize] :: BoltCfg -> Word16 -- | Driver socket timeout [socketTimeout] :: BoltCfg -> Int -- | Neo4j server hostname [host] :: BoltCfg -> String -- | Neo4j server port [port] :: BoltCfg -> Int -- | Neo4j user [user] :: BoltCfg -> Text -- | Neo4j password [password] :: BoltCfg -> Text -- | Use TLS or not [secure] :: BoltCfg -> Bool -- | The BoltValue class describes values, that can be packed and -- unpacked for BOLT protocol. class BoltValue a -- | Packs a value to ByteString pack :: BoltValue a => a -> ByteString -- | Unpacks in a State monad to get values from single ByteString unpackT :: (BoltValue a, Monad m) => UnpackT m a -- | Unpacks a ByteString to selected value unpack :: (BoltValue a, Monad m) => ByteString -> m a -- | The Value datatype generalizes all primitive BoltValues data Value N :: () -> Value B :: Bool -> Value I :: Int -> Value F :: Double -> Value T :: Text -> Value L :: [Value] -> Value M :: Map Text Value -> Value S :: Structure -> Value -- | The Structure datatype describes Neo4j structure for BOLT -- protocol data Structure Structure :: Word8 -> [Value] -> Structure [signature] :: Structure -> Word8 [fields] :: Structure -> [Value] -- | Result type for query requests type Record = Map Text Value -- | Get exact type from Value class RecordValue a exact :: (RecordValue a, Monad m) => Value -> m a at :: Monad m => Record -> Text -> m Value data Node Node :: Int -> [Text] -> Map Text Value -> Node -- | Neo4j node identifier [nodeIdentity] :: Node -> Int -- | Set of node labels (types) [labels] :: Node -> [Text] -- | Dict of node properties [nodeProps] :: Node -> Map Text Value data Relationship Relationship :: Int -> Int -> Int -> Text -> Map Text Value -> Relationship -- | Neo4j relationship identifier [relIdentity] :: Relationship -> Int -- | Identifier of start node [startNodeId] :: Relationship -> Int -- | Identifier of end node [endNodeId] :: Relationship -> Int -- | Relationship type [relType] :: Relationship -> Text -- | Dict of relationship properties [relProps] :: Relationship -> Map Text Value data URelationship URelationship :: Int -> Text -> Map Text Value -> URelationship -- | Neo4j relationship identifier [urelIdentity] :: URelationship -> Int -- | Relationship type [urelType] :: URelationship -> Text -- | Dict of relationship properties [urelProps] :: URelationship -> Map Text Value data Path Path :: [Node] -> [URelationship] -> [Int] -> Path -- | Chain of Nodes in path [pathNodes] :: Path -> [Node] -- | Chain of Relationships in path [pathRelationships] :: Path -> [URelationship] -- | Path sequence [pathSequence] :: Path -> [Int] module Database.Bolt.Lazy -- | Monad Transformer to do all BOLT actions in type BoltActionT = ReaderT Pipe -- | Creates new Pipe instance to use all requests through connect :: MonadIO m => BoltCfg -> m Pipe -- | Closes Pipe close :: MonadIO m => Pipe -> m () -- | Resets current sessions reset :: MonadIO m => Pipe -> m () -- | Runs BOLT action on selected pipe run :: Pipe -> BoltActionT m a -> m a -- | Runs Cypher query with parameters and returns list of obtained -- Records. Lazy version queryP :: MonadIO m => Text -> Map Text Value -> BoltActionT m [Record] -- | Runs Cypher query and returns list of obtained Records. Lazy -- version query :: MonadIO m => Text -> BoltActionT m [Record] -- | Runs Cypher query with parameters and ignores response queryP_ :: MonadIO m => Text -> Map Text Value -> BoltActionT m () -- | Runs Cypher query and ignores response query_ :: MonadIO m => Text -> BoltActionT m () data Pipe -- | Configuration of driver connection data BoltCfg BoltCfg :: Word32 -> Word32 -> Text -> Word16 -> Int -> String -> Int -> Text -> Text -> Bool -> BoltCfg -- | '6060B017' value [magic] :: BoltCfg -> Word32 -- | '00000001' value [version] :: BoltCfg -> Word32 -- | Driver user agent [userAgent] :: BoltCfg -> Text -- | Maximum chunk size of request [maxChunkSize] :: BoltCfg -> Word16 -- | Driver socket timeout [socketTimeout] :: BoltCfg -> Int -- | Neo4j server hostname [host] :: BoltCfg -> String -- | Neo4j server port [port] :: BoltCfg -> Int -- | Neo4j user [user] :: BoltCfg -> Text -- | Neo4j password [password] :: BoltCfg -> Text -- | Use TLS or not [secure] :: BoltCfg -> Bool -- | The BoltValue class describes values, that can be packed and -- unpacked for BOLT protocol. class BoltValue a -- | Packs a value to ByteString pack :: BoltValue a => a -> ByteString -- | Unpacks in a State monad to get values from single ByteString unpackT :: (BoltValue a, Monad m) => UnpackT m a -- | Unpacks a ByteString to selected value unpack :: (BoltValue a, Monad m) => ByteString -> m a -- | The Value datatype generalizes all primitive BoltValues data Value N :: () -> Value B :: Bool -> Value I :: Int -> Value F :: Double -> Value T :: Text -> Value L :: [Value] -> Value M :: Map Text Value -> Value S :: Structure -> Value -- | The Structure datatype describes Neo4j structure for BOLT -- protocol data Structure Structure :: Word8 -> [Value] -> Structure [signature] :: Structure -> Word8 [fields] :: Structure -> [Value] -- | Result type for query requests type Record = Map Text Value -- | Get exact type from Value class RecordValue a exact :: (RecordValue a, Monad m) => Value -> m a at :: Monad m => Record -> Text -> m Value data Node Node :: Int -> [Text] -> Map Text Value -> Node -- | Neo4j node identifier [nodeIdentity] :: Node -> Int -- | Set of node labels (types) [labels] :: Node -> [Text] -- | Dict of node properties [nodeProps] :: Node -> Map Text Value data Relationship Relationship :: Int -> Int -> Int -> Text -> Map Text Value -> Relationship -- | Neo4j relationship identifier [relIdentity] :: Relationship -> Int -- | Identifier of start node [startNodeId] :: Relationship -> Int -- | Identifier of end node [endNodeId] :: Relationship -> Int -- | Relationship type [relType] :: Relationship -> Text -- | Dict of relationship properties [relProps] :: Relationship -> Map Text Value data URelationship URelationship :: Int -> Text -> Map Text Value -> URelationship -- | Neo4j relationship identifier [urelIdentity] :: URelationship -> Int -- | Relationship type [urelType] :: URelationship -> Text -- | Dict of relationship properties [urelProps] :: URelationship -> Map Text Value data Path Path :: [Node] -> [URelationship] -> [Int] -> Path -- | Chain of Nodes in path [pathNodes] :: Path -> [Node] -- | Chain of Relationships in path [pathRelationships] :: Path -> [URelationship] -- | Path sequence [pathSequence] :: Path -> [Int]