Details

    • New Feature
    • Resolution: Fixed
    • Major
    • 1.1.0-dp2
    • 1.1.0
    • None
    • Security Level: Public
    • None

    Description

      For 1.1.0 we will need a new function/method view()

      $result = couchbase_view(string, $handle, string $design_doc_name, string $view_name[, array $options]);
      $result = Couchbase::view(string $design_doc_name, string $view_name[, array $options]);

      Result should be an iterator that we can loop over like this:

      while($row = $result->fetch_row) {

      }

      or

      foreach($result AS $key, $value) {

      }

      Ideally, this fetches results as they are requested from PHP.

      $options is an associative array that just passes on any k/v pairs that one can specify on a CouchDB view: http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options

      For testing, see the test cases in https://github.com/couchbaselabs/php-couchbase/blob/master/test/CouchbaseTest.php
      (test data in https://github.com/couchbaselabs/php-couchbase/blob/master/test/lib.php) we need that at least.

      On the libcouchbase side, check examples/couchview.c how to query the view.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jan Jan Lehnardt (Inactive)
            jan Jan Lehnardt (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty