Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

StartKey and EndKey for views

Signed-off-by: Alexander Dorofeev <aka.spin@gmail.com>
  • Loading branch information...
commit e8e746f82ce0e113a9e860ef70638acc2f8783ad 1 parent 61ff88f
@akaspin authored
Showing with 18 additions and 1 deletion.
  1. +1 −1  couchdb-conduit.cabal
  2. +17 −0 src/Database/CouchDB/Conduit/View.hs
View
2  couchdb-conduit.cabal
@@ -1,5 +1,5 @@
name: couchdb-conduit
-version: 0.8.1
+version: 0.8.2
cabal-version: >= 1.8
build-type: Simple
stability: Testing
View
17 src/Database/CouchDB/Conduit/View.hs
@@ -41,6 +41,8 @@ module Database.CouchDB.Conduit.View
-- ** Keys
-- $view_query_keys #view_query_keys#
viewQpKey,
+ viewQpStartKey,
+ viewQpEndKey,
viewQpKeys,
-- ** Control
@@ -214,6 +216,21 @@ viewQpKey :: A.ToJSON a =>
-> HT.QueryItem
viewQpKey = viewQp "key"
+-- | Row key to start with.
+-- Shorthand for @viewQp "startkey"@
+viewQpStartKey :: A.ToJSON a =>
+ a -- ^ Start Key value
+ -> HT.QueryItem
+viewQpStartKey = viewQp "startkey"
+
+-- | Row key to end with.
+-- Shorthand for @viewQp "endkey"@
+viewQpEndKey :: A.ToJSON a =>
+ a -- ^ Start Key value
+ -> HT.QueryItem
+viewQpEndKey = viewQp "endkey"
+
+
-- | Make @keys=...@ query parameter.
-- Shorthand for @viewQp \"keys\"@.
--
Please sign in to comment.
Something went wrong with that request. Please try again.