couchdb-conduit-0.10.3: Couch DB client library using http-conduit and aeson

Safe HaskellSafe-Infered

Database.CouchDB.Conduit.Implicit

Contents

Description

Implicit methods for CouchDB documents.

All implicit methods needs parser or encoder.

Synopsis

Accessing documents

couchGetSource

Arguments

:: MonadCouch m 
=> (Value -> Result a)

Parser

-> Path

Document path.

-> Path

Document path.

-> Query

Query

-> m (Revision, a) 

Load CouchDB document and parse it with given parser.

 (rev, rawJson) <- couchGet Success "mydb" mydoc []

Manipulating documents

couchPutSource

Arguments

:: MonadCouch m 
=> (a -> ByteString)

Encoder

-> Path

Document path.

-> Path

Document path.

-> Revision

Document revision. For new docs provide ^ empty string.

-> Query

Query arguments.

-> a

The object to store.

-> m Revision 

Put document, with given encoder

couchPut_Source

Arguments

:: MonadCouch m 
=> (a -> ByteString)

Encoder

-> Path

Document path.

-> Path

Document path.

-> Query

Query arguments.

-> a

The object to store.

-> m Revision 

"Don't care" version of couchPut. Creates document only in its absence.

couchPut'Source

Arguments

:: MonadCouch m 
=> (a -> ByteString)

Encoder

-> Path

Document path.

-> Path

Document path.

-> Query

Query arguments.

-> a

The object to store.

-> m Revision 

Brute force version of couchPut. Creates a document regardless of presence.