Couchbase

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile Access more options (Alt+g)
  • Couchbase.com Access more options
    • Why NoSQL?
    • Couchbase Server
    • Download
    • Learn
    • Careers
Couchbase PHP client library
  • Couchbase PHP client library
  • PCBC-48

Implement view()

  • Agile Board
  • More Actions
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1.0
  • Fix Version/s: 1.1.0-dp2
  • Component/s: None
  • Security Level: Public
  • Labels:
    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.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Gerrit Reviews
There are no comments yet on this issue.

People

  • Assignee:
    Jan Lehnardt
    Reporter:
    Jan Lehnardt
Vote (0)
Watch (0)

Dates

  • Created:
    01/Mar/12 9:41 AM
    Updated:
    08/Jun/12 4:22 AM
    Resolved:
    08/Jun/12 4:21 AM

Agile

  • View on Board
  • Atlassian JIRA (v5.2.4#845-sha1:c9f4cc4)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Couchbase. Try JIRA - bug tracking software for your team.