[clouchdb-cvs] CVS clouchdb/src

peddy peddy at common-lisp.net
Sun Nov 22 16:41:25 UTC 2009


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

Modified Files:
	changelog.txt clouchdb.lisp 
Log Message:
Finally add ad-hoc-view patch from Marco


--- /project/clouchdb/cvsroot/clouchdb/src/changelog.txt	2009/07/22 20:30:43	1.15
+++ /project/clouchdb/cvsroot/clouchdb/src/changelog.txt	2009/11/22 16:41:25	1.16
@@ -4,7 +4,8 @@
   - Added error handling in create-db for illegal database names
   - Added get-uuids function and related doc
   - Remembered to increment *couchdb-version* for the first time in a long time
-  - Made (document-property) and (setf (document-property)) accept list of property names
+  - Made (document-property) and (setf (document-property)) accept a list of property names
+  - Made (set-document-property) accept multiple lists of property names
   - Made (get-document) accept documents with :|_id| or :|id| properties
   - Fixed (delete-document) to work more consistently with :if-missing
 
--- /project/clouchdb/cvsroot/clouchdb/src/clouchdb.lisp	2009/07/22 20:31:31	1.45
+++ /project/clouchdb/cvsroot/clouchdb/src/clouchdb.lisp	2009/11/22 16:41:25	1.46
@@ -1114,7 +1114,7 @@
 (defun ad-hoc-view (view &rest options &key key start-key
                     start-key-docid end-key end-key-docid limit stale
                     descending skip group group-level reduce
-                    include-docs)
+                    include-docs (language "javascript"))
   "Execute query using an ad-hoc view."
   (declare (ignore key start-key start-key-docid end-key end-key-docid
                    limit stale descending skip group group-level
@@ -1126,7 +1126,9 @@
 		:content-type "application/json"
                 :content-length nil
                 :parameters (transform-params options *view-options*)
-		:content view)))
+		:content 
+                (cat "{\"language\" : \"" language "\"," 
+                     "\"map\" : \"" view "\"}"))))
 
 (defun create-view (id view &key (language "javascript"))
   "Create one or more views in the specified view document ID."
@@ -1241,7 +1243,7 @@
     (put-document doc :id list-id)))
 
 (defun add-ps-lists (id &rest list-defs)
-  "Add lists in list-defs to document identified by id. If the
+  "Add CouchDb lists in list-defs to document identified by id. If the
 document does not exist, create it. If any list function definitions
 already exist in the document, update them."
   (apply #'add-ps-fns id :|lists| list-defs))





More information about the clouchdb-cvs mailing list