From peddy at common-lisp.net Mon Sep 6 22:21:27 2010 From: peddy at common-lisp.net (peddy) Date: Mon, 06 Sep 2010 18:21:27 -0400 Subject: [clouchdb-cvs] CVS clouchdb/public_html Message-ID: Update of /project/clouchdb/cvsroot/clouchdb/public_html In directory cl-net:/tmp/cvs-serv5199/public_html Modified Files: index.html Log Message: Cleanup, rename db-name to name, other changes lin changlog.txt --- /project/clouchdb/cvsroot/clouchdb/public_html/index.html 2009/11/27 22:49:28 1.12 +++ /project/clouchdb/cvsroot/clouchdb/public_html/index.html 2010/09/06 22:21:27 1.13 @@ -580,7 +580,7 @@

 ;; Create the database named in the current connection settings
-(set-connection :db-name "tvland")
+(set-connection :name "tvland")
 (create-db)
 => ((:|ok| . T))
 
@@ -593,7 +593,7 @@
 
 ;; Create named db, if it already exists, drop it and 
 ;; recreate it. Specify db using a db structure.
-(create-db (make-db :db-name "tvland") :if-exists :recreate)
+(create-db (make-db :name "tvland") :if-exists :recreate)
 => ((:|ok| . T))
 
@@ -625,7 +625,7 @@

 ;; Create then delete the database named in the current connection settings
-(set-connection :db-name "tvland")
+(set-connection :name "tvland")
 (create-db)
 => ((:|ok| . T))
 (delete-db)
@@ -746,7 +746,7 @@
 
 

[Function]
set-connection &key host -db-name protocol port document-update-fn document-fetch-fn => db structure +name protocol port document-update-fn document-fetch-fn => db structure

@@ -829,7 +829,7 @@

[Macro]
with-connection (&key db -host db-name protocol port document-update-fn document-fetch-fn) +host name protocol port document-update-fn document-fetch-fn) &body body => value returned by evaluation of body

@@ -851,13 +851,13 @@

 ;; Get document from specified host and database
-(with-connection (:host "cornichon.cucumber.net" :db-name "rfc")
+(with-connection (:host "cornichon.cucumber.net" :name "rfc")
   (get-document "2616"))
 
 ;; Copy document identified by "someid" from database "otherdb" to 
 ;; current database, use "copy-of-someid" for copied document ID.
 (put-document
-  (with-connection (:db-name "otherdb")
+  (with-connection (:name "otherdb")
     (get-document "someid"))
   :id "copy-of-someid")
 
@@ -873,7 +873,7 @@ database. Database is created using the current connection information in *clouchdb*, with a name that should not conflict with existing database names. The database is deleted before - returning. This is so for mostly useful for testing. + returning.

 (with-temp-db 




From peddy at common-lisp.net  Mon Sep  6 22:22:50 2010
From: peddy at common-lisp.net (peddy)
Date: Mon, 06 Sep 2010 18:22:50 -0400
Subject: [clouchdb-cvs] CVS clouchdb/src
Message-ID: 

Update of /project/clouchdb/cvsroot/clouchdb/src
In directory cl-net:/tmp/cvs-serv5302/src

Modified Files:
	changelog.txt clouchdb.lisp package.lisp tests.lisp 
Log Message:

Cleanup, change db-name to name, other changes in changelog.txt


--- /project/clouchdb/cvsroot/clouchdb/src/changelog.txt	2009/11/27 22:49:28	1.17
+++ /project/clouchdb/cvsroot/clouchdb/src/changelog.txt	2010/09/06 22:22:50	1.18
@@ -1,4 +1,12 @@
 
+0.0.14:
+  - Applied patch for basic-authorization provided by Knut Olav B??hmer
+  - Updated ensure-db to use missing-db error message instead of re-checking for db existance
+  - Removed unused parameters from ensure-db
+  - Added 'user' and 'password' parameters to with-connection macro
+  - Fixed bug in save-attachment
+  - Export db-protocol in package.lisp
+
 0.0.13:
   - Applied ad-hoc-view patch from Marco
   - Added basic authentication support
--- /project/clouchdb/cvsroot/clouchdb/src/clouchdb.lisp	2009/11/27 22:48:32	1.47
+++ /project/clouchdb/cvsroot/clouchdb/src/clouchdb.lisp	2010/09/06 22:22:50	1.48
@@ -29,7 +29,7 @@
 (defvar *default-db-name* "default" "Default database name")
 (defvar *default-protocol* "http" "http or https")
 (defvar *default-content-type* "application/octet-stream")
-
+(defvar *view-function-names* '(map reduce validate-doc-update))
 (defvar *debug-requests* nil)
 
 (defstruct (db (:constructor new-db))
@@ -297,7 +297,7 @@
                (couchdb-host-url *couchdb*) "/"
 	       (apply #'concatenate 'string rest)))
 
-(defmacro ensure-db ((&key (db-name nil db-name-p)) &body body)
+(defmacro ensure-db (&body body)
   "Wrap request in code to check for errors due to non-existant data
 bases. This is necessary because in a document operation, CouchDb does
 not distinguish between an error due to a missing document and a
@@ -305,11 +305,10 @@
   (let ((result (gensym)))
     `(let ((,result (progn , at body)))
        (when (and (listp ,result) 
-                  (equal "not_found" (document-property :|error| ,result)))
-	 (let ((*couchdb* (if ,db-name-p (make-db :name ,db-name) *couchdb*)))
-	   (if (document-property :|error| (get-db-info))
-	       (error 'db-does-not-exist
-		      :result ,result :db *couchdb* :uri (make-uri)))))
+                  (equal "not_found" (document-property :|error| ,result))
+                  (equal "no_db_file" (document-property :|reason|, result)))
+         (error 'db-does-not-exist
+                :result ,result :db *couchdb* :uri (make-uri)))
        ,result)))
 
 (defun document-as-hash (doc)
@@ -505,12 +504,17 @@
 (defun db-request (uri &rest args &key &allow-other-keys)
   "Used by most Clouchdb APIs to make the actual REST request."
   (let ((*text-content-types* *text-types*))
-    (multiple-value-bind (body status headers uri stream must-close reason-phrase)
-	(apply #'drakma:http-request (make-uri uri) args)
+    (multiple-value-bind (body status headers uri stream must-close
+                               reason-phrase)
+        (apply #'drakma:http-request (make-uri uri)
+               `(, at args :basic-authorization
+                        ,(when (db-user *couchdb*)
+                               (list (db-user *couchdb*)
+                                     (db-password *couchdb*)))))
       (when *debug-requests*
-        (format t "uri: ~s~%args: ~s~%must-close:~s~%reason-phrase:
-        ~s~%status: ~s~%headers: ~s~%stream:~s~%body:~s~%" uri args
-        must-close reason-phrase status headers stream body))
+        (format t "uri: ~s~%args: ~s~%must-close:~s~%reason-phrase: ~s~%
+status: ~s~%headers: ~s~%stream:~s~%body:~s~%" 
+                uri args must-close reason-phrase status headers stream body))
       (if (stringp body) 
           (values (json-to-document body) status)
           (values body status reason-phrase)))))
@@ -541,16 +545,15 @@
                    document-fetch-fn db))
   (setf *couchdb* (apply #'make-db args)))
 
-(defmacro with-connection ((&key db name port protocol
-                                 host document-update-fn
-                                 document-fetch-fn) &body body)
+(defmacro with-connection ((&rest args &key (db *couchdb*)
+                                  name port protocol host user password
+                                  document-update-fn document-fetch-fn)
+                           &body body)
   "Execute body in the context of the specified database connection
 information.."
-  `(let ((*couchdb* (make-db :db ,(or db *couchdb*)
-                             :name ,name :port ,port 
-                             :protocol ,protocol :host ,host 
-                             :document-fetch-fn ,document-fetch-fn
-                             :document-update-fn ,document-update-fn)))
+  (declare (ignore host port name protocol user password document-update-fn
+                   document-fetch-fn db))
+  `(let ((*couchdb* (apply #'make-db (quote ,args))))
      (progn , at body)))
 
 (defun document-properties (document)
@@ -1155,7 +1158,7 @@
 document. If the path ends with a file name the attachment will be
 created with that name."
   (let ((in (get-attachment-stream doc-or-id attachment))
-        (output-path (if (> 0 (length (file-namestring path)))
+        (output-path (if (> (length (file-namestring path)) 0)
                          path
                          (merge-pathnames (pathname path)
                                           (pathname 
@@ -1232,9 +1235,9 @@
   (cond ((not (eq 'defun defun))
          (error 'ps-view-def-error :ps-view-def 
                 "View definition should take the form (defun  (params) (....)"))
-        ((not (or (eq fn-name 'map) (eq fn-name 'reduce)))
+        ((not (find fn-name *view-function-names*))
          (error 'ps-view-def-error :ps-view-def
-                "Valid function names are 'map' or 'reduce'"))
+                (format nil "Valid function names are ~{~s ~}" *view-function-names*)))
         ((and (eq fn-name 'map) (not (eq 1 (length fn-param))))
          (error 'ps-view-def-error :ps-view-def
                 "map takes one parameter, e.g.: (defun map (doc) (... (emit ...))"))
@@ -1309,6 +1312,27 @@
 		:method :get
                 :parameters (transform-params options *view-options*))))
 
+(defun view-util (cmd)
+  "Compact named view"
+  (multiple-value-bind (res status)
+      (db-request (cat (db-name *couchdb*) cmd)
+                  :method :post)
+    (cond ((eq 202 status)
+           res)
+          ((document-property :|error| res)
+           (error 'doc-error
+                  :id cmd
+                  :text (document-property :|error| res)
+                  :reason (document-property :|reason| res))))))
+
+(defun view-cleanup ()
+  "Compact named view"
+  (view-util "/_view_cleanup"))
+
+(defun compact-view (view-name)
+  "Compact named view"
+  (view-util (cat "/_compact/" view-name)))
+
 (defun add-ps-fns (id type &rest list-defs)
   "Add lists in list-defs to document identified by id. If the
 document does not exist, create it. If any list function definitions
--- /project/clouchdb/cvsroot/clouchdb/src/package.lisp	2009/07/17 00:26:32	1.16
+++ /project/clouchdb/cvsroot/clouchdb/src/package.lisp	2010/09/06 22:22:50	1.17
@@ -56,6 +56,7 @@
    :db-host
    :db-name
    :db-password
+   :db-protocol
    :db-port
    :db-user
    :delete-attachment
--- /project/clouchdb/cvsroot/clouchdb/src/tests.lisp	2009/11/27 22:49:28	1.30
+++ /project/clouchdb/cvsroot/clouchdb/src/tests.lisp	2010/09/06 22:22:50	1.31
@@ -147,11 +147,24 @@
                      doc)))))
 
 
-
-;;
-;; DB Structure Tests
-;;
-
+(addtest (clouchdb-general-tests)
+  (:documentation "Ensure connection information is correctly carried over")
+  clouchdb-with-connection0
+  (with-connection (:name "wc-name" :port "3434" :protocol "https" :user "wc-user" 
+                          :password "wc-pass" :document-fetch-fn #'clouchdb::delete-db
+                          :document-update-fn #'clouchdb::create-db)
+    (ensure-same (db-name *couchdb*) "wc-name")
+    (ensure-same (db-port *couchdb*) "3434")
+    (ensure-same (clouchdb::db-protocol *couchdb*) "https")
+    (ensure-same (db-user *couchdb*) "wc-user")
+    (ensure-same (db-password *couchdb*) "wc-pass")))
+
+(addtest (clouchdb-general-tests)
+  (:documentation "Ensure user can be set to nil")
+  clouchdb-with-connection1
+  (with-connection (:user "wc-user")
+    (with-connection (:user nil)
+      (ensure-same nil (db-user *couchdb*)))))
 
 ;;
 ;; (document-property) tests




From peddy at common-lisp.net  Fri Sep 10 23:38:00 2010
From: peddy at common-lisp.net (peddy)
Date: Fri, 10 Sep 2010 19:38:00 -0400
Subject: [clouchdb-cvs] CVS clouchdb/src
Message-ID: 

Update of /project/clouchdb/cvsroot/clouchdb/src
In directory cl-net:/tmp/cvs-serv3844

Modified Files:
	changelog.txt clouchdb.lisp package.lisp 
Log Message:
Added initial implementation of (changes)


--- /project/clouchdb/cvsroot/clouchdb/src/changelog.txt	2010/09/06 22:22:50	1.18
+++ /project/clouchdb/cvsroot/clouchdb/src/changelog.txt	2010/09/10 23:38:00	1.19
@@ -6,6 +6,10 @@
   - Added 'user' and 'password' parameters to with-connection macro
   - Fixed bug in save-attachment
   - Export db-protocol in package.lisp
+  - Added create-target parmaeter to replicate
+  - Removed references to create-view in doc
+  - Added duplicate error handling to create-view
+  - Added changes function (incomplete)
 
 0.0.13:
   - Applied ad-hoc-view patch from Marco
--- /project/clouchdb/cvsroot/clouchdb/src/clouchdb.lisp	2010/09/06 22:22:50	1.48
+++ /project/clouchdb/cvsroot/clouchdb/src/clouchdb.lisp	2010/09/10 23:38:00	1.49
@@ -50,8 +50,6 @@
     (nil . "xml"))
   "Defined to instruct Drakma to treat json responses as text")
 
-(defparameter *temp-db-counter* 0 "Used in the creation of temporary databases")
-
 (defmacro define-constant (name value &optional doc)
   "A version of DEFCONSTANT for /strict/ CL implementations."
   ;; See 
@@ -78,6 +76,14 @@
   "Return \"false\" if value is nil, otherwise nil"
   (unless value "false"))
 
+(defparameter *changes-options*
+  '((:feed . ((:name . "feed") (:fn . keyword-to-http-param)))
+    (:since . ((:name . "since") (:fn . value-as-string)))
+    (:style . ((:name . "style") (:fn . keyword-to-http-param)))
+    (:heartbeat . ((:name . "heartbeat") (:fn . value-as-string)))
+    (:filter . ((:name . "filter") (:fn . identity))))
+  "Parameters for the changes function.")
+
 (defparameter *view-options*
   `((:key . ((:name . "key") (:fn . document-to-json)))
     (:start-key . ((:name . "startkey") (:fn . document-to-json)))
@@ -166,6 +172,13 @@
 		     (reason condition)
 		     (id condition)))))
   
+(define-condition invalid-design-doc (doc-error)
+  ()
+  (:report (lambda (condition stream)
+             (format stream "Reason \"~A\", URI: \"~A\""
+                     (reason condition)
+                     (text condition)))))
+
 (define-condition id-or-revision-conflict (doc-error) 
   ()
   (:report (lambda (condition stream)
@@ -347,6 +360,18 @@
          (symbol-name value))
         (t value)))
 
+(defun keyword-to-http-param (keyword-symbol)
+  "Convert a keword symbol that may contain hyphen characters to a
+lower case string with any hyphens replaced by underscores:
+':all-the-best' -> 'all_the_best'."
+  (substitute #\_ #\- 
+              (string-downcase 
+               (cond ((keywordp keyword-symbol) 
+                      (as-field-name-string keyword-symbol))
+                     ((stringp keyword-symbol)
+                      keyword-symbol)
+                     (t keyword-symbol)))))
+
 (defun document-property (name doc)
   "Get the value associated with the document property or nil if there
 is no associated value. Note that name may be either a keyword symbol,
@@ -704,12 +729,45 @@
          (delete-db))
        ,result)))
 
-(defun replicate (target &key (source *couchdb*))
+(defun changes (&rest options &key (db *couchdb*) feed since style
+                heartbeat filter fn)
+  "Return the document change activity. The :feed keyword parameter
+value indicates how to poll for changes. Valid values for this
+parameter include :longpoll to block waiting for a single change
+response or :continuous to poll for changes indefinately.
+
+The :style keyword parameter should either be :main-only (the default)
+or :all-docs for more revision information."
+  (declare (ignore since style heartbeat))
+  (let ((*couchdb* (db-or-db-name db)))
+    (ensure-db ()
+         (multiple-value-bind (res status)
+             (db-request (cat (url-encode (db-name *couchdb*)) "/_changes")
+                         :parameters (transform-params options *changes-options*)
+                         :want-stream feed :method :get)
+           (cond ((not (equal status 200))
+                  (let ((rdoc (if (stringp res) (json-to-document res) res)))
+                    (cond ((equal "invalid design doc" (document-property :|reason| rdoc))
+                           (error 'invalid-design-doc
+                                  :text res :id filter
+                                  :uri (make-uri (db-name *couchdb*) "/" filter)
+                                  :reason (document-property :|reason| rdoc))))))
+                 ((and fn (streamp res))
+                  (loop for line = (read-line res nil :eof)
+                     while (and line
+                                (not (equal line :eof))
+                                (funcall fn (json-to-document line)))
+                     finally (close res)))
+                 ((not fn)
+                  res))))))
+
+(defun replicate (target &key (source *couchdb*) (create-target nil))
   "Replicate current database to target, or source to target if source
 is specified. Source and target database values must either be strings
 or database structures. Use strings to specify simple local database
 names, use database structures to specify either local or remote
-databases."
+databases. If true, create-target will cause the replication target to
+be created automatically, as of CouchDb version 0.11."
     (ensure-db ()
       (db-request "_replicate"
                   :method :post
@@ -717,7 +775,8 @@
                   :content-type "application/json"
                   :content 
                   (cat "{\"source\":\"" (make-db-identifier source) "\","
-                       "\"target\":\"" (make-db-identifier target) "\"}"))))
+                       "\"target\":\"" (make-db-identifier target) "\","
+                       (if create-target "\"create_target\":true") "}"))))
 
 ;;
 ;; _config API
@@ -776,7 +835,7 @@
                    limit stale descending skip group group-level
                    reduce include-docs))
   (ensure-db ()
-    (db-request (cat (url-encode (db-name *couchdb*)) "/_all_docs") 
+    (db-request (cat (url-encode (db-name *couchdb*)) "/_all_docs")
 		:method (if keys :post :get)
                 :content-type "application/json"
 		:parameters (transform-params options *view-options*)
@@ -1212,18 +1271,24 @@
 
 (defun create-view (id view &key (language "javascript"))
   "Create one or more views in the specified view document ID."
-  (ensure-db ()
-    (db-request (cat (url-encode (db-name *couchdb*)) 
-                     "/_design/" 
-                     (url-encode id))
-                :method :put
-                :external-format-out +utf-8+
-                :basic-authorization (make-db-auth *couchdb*)
-		:content-type "application/json"
-                :content-length nil
-                :content
-                (cat "{\"language\" : \"" language "\"," 
-                     "\"views\" : {" view "}}"))))
+  (let ((res (ensure-db ()
+                        (db-request (cat (url-encode (db-name *couchdb*)) 
+                                         "/_design/" 
+                                         (url-encode id))
+                                    :method :put
+                                    :external-format-out +utf-8+
+                                    :basic-authorization (make-db-auth *couchdb*)
+                                    :content-type "application/json"
+                                    :content-length nil
+                                    :content
+                                    (cat "{\"language\" : \"" language "\"," 
+                                         "\"views\" : {" view "}}")))))
+    (when (document-property :|error| res)
+      (error (if (equal "conflict" (document-property :|error| res))
+                 'id-or-revision-conflict
+                 'doc-error)
+             :id id :reason (document-property :|reason| res)))
+    res))
 
 (defun create-ps-view (id &rest view-defs)
   "Create one or more views in the specified view document ID."
--- /project/clouchdb/cvsroot/clouchdb/src/package.lisp	2010/09/06 22:22:50	1.17
+++ /project/clouchdb/cvsroot/clouchdb/src/package.lisp	2010/09/10 23:38:00	1.18
@@ -38,6 +38,7 @@
    :attachment-missing
    :attachment-name
    :bulk-document-update
+   :changes
    :compact-db
    :copy-document
    :couchdb-document-properties




From peddy at common-lisp.net  Fri Sep 10 23:38:38 2010
From: peddy at common-lisp.net (peddy)
Date: Fri, 10 Sep 2010 19:38:38 -0400
Subject: [clouchdb-cvs] CVS clouchdb/src
Message-ID: 

Update of /project/clouchdb/cvsroot/clouchdb/src
In directory cl-net:/tmp/cvs-serv4069

Modified Files:
	decoder.lisp 
Log Message:
Added initial implementation of (changes), check for empty string in decoder


--- /project/clouchdb/cvsroot/clouchdb/src/decoder.lisp	2008/01/07 01:21:24	1.2
+++ /project/clouchdb/cvsroot/clouchdb/src/decoder.lisp	2010/09/10 23:38:38	1.3
@@ -71,8 +71,10 @@
     (car (rassoc lisp-char *json-lisp-escaped-chars*)))
 
 (defun json-to-document (json-string)
-  (with-input-from-string (stream json-string)
-    (decode-json stream)))
+  (if (> (length json-string) 0)
+      (with-input-from-string (stream json-string)
+        (decode-json stream))
+      nil))
 
 (defun decode-json (&optional (stream *standard-input*))
   "Reads a json element from stream"




From peddy at common-lisp.net  Fri Sep 10 23:46:39 2010
From: peddy at common-lisp.net (peddy)
Date: Fri, 10 Sep 2010 19:46:39 -0400
Subject: [clouchdb-cvs] CVS clouchdb/public_html
Message-ID: 

Update of /project/clouchdb/cvsroot/clouchdb/public_html
In directory cl-net:/tmp/cvs-serv8201/public_html

Modified Files:
	index.html 
Log Message:
Add doc for (changes)


--- /project/clouchdb/cvsroot/clouchdb/public_html/index.html	2010/09/06 22:21:27	1.13
+++ /project/clouchdb/cvsroot/clouchdb/public_html/index.html	2010/09/10 23:46:39	1.14
@@ -231,7 +231,7 @@
    :DOCUMENT-FETCH-FN NIL
    :DOCUMENT-UPDATE-FN NIL)
 
-;; Get CouchDb Server Information. This is the first communication
+;; GetCouchDb Server Information. This is the first communication
 ;; with the CouchDb server.
 CLOUCHDB-USER> (get-couchdb-info)
 ((:|couchdb| . "Welcome") (:|version| . "0.10.0a788899"))
@@ -528,6 +528,52 @@
 

[Function]
+changes &key db +

+
+

+ Return the document change activity for the current database or a + specific database specified with the :db keyword + parameter. The database can be specified as a string for a database + in the current CouchDb host, or as a db structure to specify a + database on a host other than the current one specified in *couchdb*. +

+Example: +

+
+;; Changes for the current database
+(changes)
+=> 
+((:|results|
+  ((:|seq| . 4) (:|id| . "_design/example")
+   (:|changes| ((:|rev| . "1-f83b5f3e154eb3c0ba2d721ad53211b3"))))
+  ((:|seq| . 5) (:|id| . "_design/toast")
+   (:|changes| ((:|rev| . "1-3525a1d974ba13a34d26e305116feab2")))))
+ (:|last_seq| . 5))
+
+;; Specify database
+(changes :db "example")
+=> 
+((:|results|
+  ((:|seq| . 4) (:|id| . "_design/example")
+   (:|changes| ((:|rev| . "1-f83b5f3e154eb3c0ba2d721ad53211b3"))))
+  ((:|seq| . 5) (:|id| . "_design/toast")
+   (:|changes| ((:|rev| . "1-3525a1d974ba13a34d26e305116feab2")))))
+ (:|last_seq| . 5))
+
+;; Specify database and host
+(changes :db (make-db :name "example" :host "somehost"))
+=> 
+((:|results|
+  ((:|seq| . 4) (:|id| . "_design/example")
+   (:|changes| ((:|rev| . "1-f83b5f3e154eb3c0ba2d721ad53211b3"))))
+  ((:|seq| . 5) (:|id| . "_design/toast")
+   (:|changes| ((:|rev| . "1-3525a1d974ba13a34d26e305116feab2")))))
+ (:|last_seq| . 5))
+
+
+ +

[Function]
compact-db &key db

@@ -825,8 +871,28 @@ structure. The source database defaults to the current value of *couchdb*.

+

+ If the :create-target keyword parmaeter is true the database + will automatically create the replication target if necessary + (requires CouchDb version 0.11+) +

+

+ Example: +

+
+  ;; Replicate current database to databased named "backup" on the same server
+  (replicate "backup")
+
+  ;; Replicate current database to remotely hosted "backup" database
+  (replicate (make-db :name "backup" :host "remote"))
+   
+  ;; Replicate one remote database to another
+  (replicate (make-db :name "backup" :host "remoteB")
+     :source (make-db :name "source" :host "remoteA"))
+
+

[Macro]
with-connection (&key db host name protocol port document-update-fn document-fetch-fn) @@ -1924,7 +1990,8 @@ (if (eql doc.*name* "Laraby") (emit nil doc))))))

-

See (create-view) and Example 3

+

See (create-ps-view) and +Example 3

[Function]
@@ -1977,7 +2044,7 @@ Delete view document identified by id. If revision is specified, delete specific revision of view document.

-

See (create-view)

+

See (create-ps-view)

[Function]
@@ -2039,7 +2106,7 @@ (create-document '((:name . "Laraby"))) ;; Views defined with Parenscript -(create-view "names" +(create-ps-view "names" (cons "laraby" (ps (lambda (doc) ;; parameter-less view (with-slots (name) doc @@ -2057,7 +2124,7 @@ (invoke-view "names" "name" :key "Laraby")

-See (create-view) +See (create-ps-view) (ad-hoc-view) and Example 3

@@ -2151,6 +2218,7 @@ attachment-name
bulk-document-update
clouchdb-error
+ changes
compact-db
copy-document
*couchdb*
@@ -2159,7 +2227,6 @@ create-document
create-ps-view
create-temp-db
- create-view
db-already-exists
db-does-not-exist
db-existential-error