[clouchdb-cvs] CVS clouchdb/public_html
peddy
peddy at common-lisp.net
Sat Jan 19 20:18:57 UTC 2008
Update of /project/clouchdb/cvsroot/clouchdb/public_html
In directory clnet:/tmp/cvs-serv31191/public_html
Modified Files:
index.html
Log Message:
--- /project/clouchdb/cvsroot/clouchdb/public_html/index.html 2007/12/22 02:11:14 1.12
+++ /project/clouchdb/cvsroot/clouchdb/public_html/index.html 2008/01/19 20:18:57 1.13
@@ -712,9 +712,10 @@
</p>
<blockquote>
<p>
-Create a new document, optionally specifying the document's ID. This
-method simply calls (<a href="#sym-post-document">post-document</a>)
-if an ID is specified, otherwise (<a href="#sym-put-document">put-document</a>).
+ Create a new document, optionally specifying the document's ID. This
+ method simply calls (<a href="#sym-put-document">put-document</a>)
+ if an ID is specified, otherwise it calls
+ (<a href="#sym-post-document">post-document</a>).
</p>
<p>
Example:
@@ -801,8 +802,23 @@
<a name="sym-post-document"><b>post-document</b></a> doc</p>
<blockquote>
<p>
-Create a document and let the server assign an ID.
+ Create a document and let the server assign an ID. An existing
+ :|_id| field in the document will be ignored, the server will create
+ a new document and assign it a new ID. This therefore is an easy way
+ to copy documents. The return value includes the server-assigned
+ document ID in the :|id| property.
</p>
+
+<p>
+Example:
+</p>
+<pre class="code">
+;; Create a document, let server assign an ID
+(post-document '((:field . "value")))
+
+<b>=></b> ((:|ok| . T) (:|id| . "4A0FF20F6AE5168B771BC41D4557F650") (:|rev| . "16873930"))
+</pre>
+
<p>See (<a href="#sym-create-document">create-document</a>) (<a href="#sym-put-document">put-document</a>)</p>
</blockquote>
More information about the clouchdb-cvs
mailing list