Author: rick
Date: 2010-03-18 00:11:52 +0100 (Thu, 18 Mar 2010)
New Revision: 28597

Modified:
   plugins/sfCouchPlugin/trunk/README
   plugins/sfCouchPlugin/trunk/lib/sfCouchView.class.php
   plugins/sfCouchPlugin/trunk/package.xml
Log:
new query options

Modified: plugins/sfCouchPlugin/trunk/README
===================================================================
--- plugins/sfCouchPlugin/trunk/README  2010-03-17 22:45:23 UTC (rev 28596)
+++ plugins/sfCouchPlugin/trunk/README  2010-03-17 23:11:52 UTC (rev 28597)
@@ -99,8 +99,8 @@
 The optional second parameter is an array with the CouchDB query options 
 [See CouchDB 
wiki](http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options).
 
-       $options = array('group' => true, 'key' => 'test');
-    $result = sfCouchView::query('VIEWNAME', $options);
+       $options = array('reduce' => false, 'include_docs' => true);
+    $result = sfCouchView::query('example', $options);
     
 The result is an sfCouchResponse object that holds the returnes arrays. 
 You'll be interested in $result->rows.
@@ -110,4 +110,4 @@
 ----
 
  * Implement support for standalone files in CouchDB
- * Implement temporary views 
\ No newline at end of file
+ * Implement multiple key requests
\ No newline at end of file

Modified: plugins/sfCouchPlugin/trunk/lib/sfCouchView.class.php
===================================================================
--- plugins/sfCouchPlugin/trunk/lib/sfCouchView.class.php       2010-03-17 
22:45:23 UTC (rev 28596)
+++ plugins/sfCouchPlugin/trunk/lib/sfCouchView.class.php       2010-03-17 
23:11:52 UTC (rev 28597)
@@ -47,7 +47,8 @@
                     break;
 
                 case 'startkey_docid':
-                    // The docidstartkey is handled differntly then the other
+                case 'endkey_docid':
+                    // The startkey and endkey is handled different than the 
other
                     // keys and is just passed as a string, because it always
                     // is and can only be a string.
                     $queryString .= $key . '=' . urlencode( (string) $value );
@@ -56,12 +57,22 @@
                 case 'group':
                 case 'update':
                 case 'descending':
-                    // These two values may only contain boolean values, passed
+                case 'include_docs':
+                case 'inclusive_end':
+                case 'reduce':
+                    // These values may only contain boolean values, passed
                     // as "true" or "false". We just perform a typical PHP
                     // boolean typecast to transform the values.
                     $queryString .= $key . '=' . ( $value ? 'true' : 'false' );
                     break;
 
+                case 'stale':
+                       // This can only be 'ok'
+                       if ($value) {
+                               $queryString .= $key . '=ok'; 
+                       }
+                       break;
+                    
                 case 'skip':
                 case 'group_level':
                     // Theses options accept integers defining the limits of
@@ -77,7 +88,6 @@
                     break;
 
                 default:
-                    throw new sfException( $key );
             }
 
             $queryString .= '&';

Modified: plugins/sfCouchPlugin/trunk/package.xml
===================================================================
--- plugins/sfCouchPlugin/trunk/package.xml     2010-03-17 22:45:23 UTC (rev 
28596)
+++ plugins/sfCouchPlugin/trunk/package.xml     2010-03-17 23:11:52 UTC (rev 
28597)
@@ -13,7 +13,7 @@
  <date>2010-03-17</date>
  <time>23:00:00</time>
  <version>
-  <release>0.1.0</release>
+  <release>0.1.1</release>
   <api>1.0.0</api>
  </version>
  <stability>
@@ -30,7 +30,9 @@
    <file name="LICENSE" role="data"/>
    <file name="config/config.php" role="data"/>
    <file name="config/couchdb.yml" role="data"/>
-   <file name="config/couchdb/all_map.js" role="data"/>
+   <file name="config/couchdb/alldocs_map.js" role="data"/>
+   <file name="config/couchdb/example_map.js" role="data"/>
+   <file name="config/couchdb/example_reduce.js" role="data"/>
    <file name="lib/sfCouchConnection.class.php" role="data"/>
    <file name="lib/sfCouchDocument.class.php" role="data"/>
    <file name="lib/sfCouchResponse.class.php" role="data"/>
@@ -56,6 +58,22 @@
  </dependencies>
  <phprelease/>
  <changelog>
+   <release>
+    <version>
+      <release>0.1.1</release>
+      <api>1.0.0</api>
+    </version>
+    <stability>
+     <release>beta</release>
+     <api>beta</api>
+    </stability>
+    <license uri="http://www.gnu.org/licenses/lgpl-3.0.txt";>LGPL</license>
+    <date>2010-03-17</date>
+    <notes>
+      * changes to the readme file
+      * added CouchDB 0.9 querying options
+    </notes>
+  </release>
   <release>
     <version>
       <release>0.1.0</release>
@@ -70,6 +88,7 @@
     <notes>
       * changes to the readme file
       * added a map/reduce example
+      * more verbose exceptions
     </notes>
   </release>
 </changelog>

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to