packages feed

hasbolt 0.1.0.0 → 0.1.0.1

raw patch · 5 files changed

+11/−5 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

hasbolt.cabal view
@@ -1,5 +1,5 @@ name:                hasbolt-version:             0.1.0.0+version:             0.1.0.1 synopsis:            Haskell driver for Neo4j 3+ (BOLT protocol) description:         Please see README.md homepage:            https://github.com/zmactep/hasbolt#readme
src/Database/Bolt/Connection.hs view
@@ -16,9 +16,11 @@ -- |Monad Transformer to do all BOLT actions in type BoltActionT = ReaderT Pipe +-- |Runs BOLT action on selected pipe run :: MonadIO m => Pipe -> BoltActionT m a -> m a run = flip runReaderT +-- |Runs Cypher query and returns list of obtained 'Record's query :: MonadIO m => Text -> BoltActionT m [Record] query cypher = toRecords <$> pullRequests   where pullRequests :: MonadIO m => BoltActionT m [Response]@@ -36,6 +38,7 @@                            if isSuccess resp then return [resp]                                              else (resp:) <$> pullRest pipe +-- |Runs Cypher query and ignores response query_ :: MonadIO m => Text -> BoltActionT m () query_ cypher = do pipe <- ask                    flush pipe (createRun cypher)
src/Database/Bolt/Connection/Pipe.hs view
@@ -19,15 +19,18 @@                                                       recv, send) import           Network.Socket                      (isConnected) +-- |Creates new 'Pipe' instance to use all requests through connect :: MonadIO m => BoltCfg -> m Pipe connect bcfg = do (sock, _) <- connectSock (host bcfg) (show $ port bcfg)                   let pipe = Pipe sock (maxChunkSize bcfg)                   handshake pipe bcfg                   return pipe +-- |Closes 'Pipe' close :: MonadIO m => Pipe -> m () close = closeSock . connectionSocket +-- |Resets current sessions reset :: MonadIO m => Pipe -> m () reset pipe = do flush pipe RequestReset                 response <- fetch pipe
src/Database/Bolt/Record.hs view
@@ -53,15 +53,15 @@  instance RecordValue Relationship where   exact (S s) = fromStructure s-  exact _     = fail "Not a Node value"+  exact _     = fail "Not a Relationship value"  instance RecordValue URelationship where   exact (S s) = fromStructure s-  exact _     = fail "Not a Node value"+  exact _     = fail "Not a URelationship value"  instance RecordValue Path where   exact (S s) = fromStructure s-  exact _     = fail "Not a Node value"+  exact _     = fail "Not a Path value"  at :: Monad m => Record -> Text -> m Value at record key | member key record = return (record ! key)
src/Database/Bolt/Value/Type.hs view
@@ -6,7 +6,7 @@ import           Data.Text                 (Text) import           Data.Word                 (Word8) --- \The 'UnpackT' transformer helps to unpack a set of values from one 'ByteString'+-- |The 'UnpackT' transformer helps to unpack a set of values from one 'ByteString' type UnpackT = StateT ByteString  -- |The 'Structure' datatype describes Neo4j structure for BOLT protocol