CouchDB- CouchDB interfaceSource codeContentsIndex
Maintains a persistent HTTP connection to a CouchDB database server. CouchDB enjoys closing the connection if there is an error (document not found, etc.) In such cases, CouchMonad will automatically reestablish the connection.
request :: String -> [(String, String)] -> RequestMethod -> [Header] -> String -> CouchMonad Response
data CouchMonad a
runCouchDB :: String -> Int -> CouchMonad a -> IO a
runCouchDB' :: CouchMonad a -> IO a
:: Stringpath of the request
-> [(String, String)]dictionary of GET parameters
-> RequestMethod
-> [Header]
-> Stringbody of the request
-> CouchMonad Response
Send a request to the database. If the connection is closed, it is reopened and the request is resent. On other errors, we raise an exception.
data CouchMonad a Source
A computation that interacts with a CouchDB database. This monad encapsulates the IO monad, a persistent HTTP connnection to a CouchDB database and enough information to re-open the connection if it is closed.
show/hide Instances
=> Stringhostname
-> Intport
-> CouchMonad a
-> IO a
runCouchDB' :: CouchMonad a -> IO aSource
Connects to the CouchDB server at localhost:5984.
Produced by Haddock version 2.3.0