[clouchdb-cvs] CVS clouchdb/public_html
peddy
peddy at common-lisp.net
Wed Dec 19 15:10:43 UTC 2007
Update of /project/clouchdb/cvsroot/clouchdb/public_html
In directory clnet:/tmp/cvs-serv18123/public_html
Modified Files:
index.html
Log Message:
Updated documentation for 0.0.6 release
--- /project/clouchdb/cvsroot/clouchdb/public_html/index.html 2007/12/18 02:16:02 1.6
+++ /project/clouchdb/cvsroot/clouchdb/public_html/index.html 2007/12/19 15:10:43 1.7
@@ -43,11 +43,20 @@
<li><h4><a href="#views-api-reference">Views API</a></h4></li>
</ul>
<li><h3><a href="#symbols">Symbol Index</a></h3></li>
+ <li><h3><a href="#issues-and-bugs">Issues and Bugs</a></h3></li>
</ul>
<h2><a name="news">News</a></h2>
<ul>
+ <li><b>Dec 19, 2007</b> Released version 0.0.6 with full support for
+ utf-8 character encoding. This change includes support for
+ non-Latin characters in document IDs and in document
+ content. Additionally the encoding of spaces in document IDs has
+ been changed from "+" to "%20", this fixes a problem where the "+"
+ characters were not removed from document IDs when they were
+ decoded.
+ </li>
<li><b>Dec 17, 2007</b> Released version 0.0.5 with fixes for
encoding of URL parameters. This fix allows use of leagl CouchDb
characaters for database names and document IDs which must be
@@ -536,27 +545,45 @@
Document content takes the form of an associative list. The car of
each element of the associative list may be either a string or a
symbol. For example, each of the following calls to
- (create-document) creates a document with a field named "name":
+ (create-document) creates a document with a field wich will be
+ named "name" in the database, but which will be :NAME (a keyword
+ symbol) when the documents are retrieved:
</p>
<pre class="code">
-(create-document '((:name . "Max"))
-(create-document '((name . "Max"))
-(create-document '(("name" . "Max"))
+(create-document '((<b>:name</b> . "Max")) :id "keyword")
+(get-document "keyword")
+<b>=></b> ((:_ID . "keyword") (:_REV . "3674093994") (<b>:NAME</b> . "Max"))
+
+(create-document '((<b>name</b> . "Max")) :id "symbol")
+(get-document "symbol")
+<b>=></b> ((:_ID . "symbol") (:_REV . "3189074278") (<b>:NAME</b> . "Max"))
+
+(create-document '((<b>"name"</b> . "Max")) :id "string")
+(get-document "string")
+<b>=></b> ((:_ID . "string") (:_REV . "3730286488") (<b>:NAME</b> . "Max"))
</pre>
<p>
Field names in CouchDb are case sensitive. To specify a field name
- that uses upper case characters, you must use a string value as
- symbols are always converted to lower case. In the following
- example a single document is created with two fields, "name" and
- "Name":
+ that uses mixed case, you may either use a string value, or encode
+ the symbol approprately. In the following example a single
+ document is created with two fields named, "name" and "Name":
</p>
<pre class="code">
-(create-document '((:name . "Max")
- ("Name" . "Max")))
-</pre>
+(create-document '((<b>"FieldName"</b> . "Value")) :id "string-mixed")
+(get-document "string-mixed")
+<b>=></b> ((:_ID . "string-mixed") (:_REV . "3753754378") (<b>:*FIELD-NAME</b> . "Value"))
+
+(create-document '((<b>:*field-name</b> . "Value")) :id "keyword-mixed")
+(get-document "keyword-mixed")
+<b>=></b> ((:_ID . "keyword-mixed") (:_REV . "2016717365") (<b>:*FIELD-NAME</b> . "Value"))
+
+(create-document '((<b>*field-name</b> . "Value")) :id "symbol-mixed")
+(get-document "symbol-mixed")
+<b>=></b> ((:_ID . "symbol-mixed") (:_REV . "4010145031") (<b>:*FIELD-NAME</b> . "Value"))
+ </pre>
<p>
The native document representation in the CouchDb protocol is
@@ -574,11 +601,23 @@
<pre class="code">
(create-document '((:string . "String Value")
- (:number . 3.1415926535)
+ (:number . 42.0)
(:list . (milk eggs "green beans"))
- (:alist . ((
+ (:alist . ((:size . 3)
+ (:string . "Another String")
+ (:list . ("un" "deux" "trois"))
+ (:another-alist . ((a . "A") (b . "B")))))))
</pre>
+<p>
+ <b>Note:</b> There are issues related to the construction of
+ documents with non-trivial structure and their translation into
+ corresponding Json data, specifically with regard to confusion
+ between associative lists and
+ sequences. See <a href="#issues-and-bugs">Issues and Bugs</a> for
+ more information.
+</p>
+
</blockquote>
<p>
@@ -736,8 +775,7 @@
<p>See (<a href="#sym-create-document">create-document</a>) (<a href="#sym-post-document">post-document</a>)</p>
</blockquote>
-<hr/>
-h4><a name="views-api-reference">Views API</a></h4>
+<hr/><h4><a name="views-api-reference">Views API</a></h4>
<p>
Views are the mechanism with which documents are queried in
@@ -983,6 +1021,47 @@
</p>
</blockquote>
+<h2><a name="issues-and-bugs">Issues and Bugs</a></h2>
+<p>
+ CouchDb is a young database server, it is currently in development
+ and not yet feature complete nor are some aspects of its
+ functionality even fully designed or finalized yet. Clouchdb is a
+ new library supporting this database, and it too is still in
+ development. As a result, changes to and bugs in the Clouchdb API
+ should not be unexpected, though I do strive to minimise both.
+</p>
+
+<p>
+ With that in mind, any problems not outlined below should be brought
+ to the author's attention through
+ the <a href="#support">clouchdb-devel</a> email list.
+</p>
+
+<p>
+ Currently known issues:
+</p>
+<ul>
+
+ <li><b>Attachments</b> Attachments are not yet supported. It appears
+ that the CouchDb attachment API is not yet final. As a result,
+ support for attachments is not yet implemented in Clouchdb.
+ </li>
+
+ <li><b>Document Encoding</b> Clouchdb currently
+ uses <a href="http://common-lisp.net/project/cl-json/">cl-json</a>
+ to encode and decode lisp data in Json, the native CouchDb
+ protocol data format. Unfortunately it is not always possible for
+ cl-json to discern the correct Json type from a given lisp value,
+ and this can result in unexpected document structure. For example,
+ it easily confuses associative list data with array data if the
+ first element's value in an associative list is a sequence. This
+ problem is being looked into, suggestions for resolutions to this
+ problem are welcome.
+ </li>
+
+</ul>
+
+
<p>Back to <a href="http://common-net.lisp/">Common-lisp.net</a>.</p>
<div class="check">
@@ -995,6 +1074,5 @@
alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
</p>
-
</body>
</html>
More information about the clouchdb-cvs
mailing list