-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create View doc is incorrect #10
Comments
Hello, You're perfectly right. Thank you to report this error to me. Commit e60a901 fixed the bug. Regards, Mickael |
Thank you for such an easy to use wrapper! Regards, |
thanks couchdbuser2 for the patch. as I am a newbie to couchDB I got stuck.: a database without getting results is useless. you made my day! merry Xmas by the way! |
Phew, this issue really popped me out of my socks. couchdbuser2 had some nice bugs in it: $design_doc->views = array ( 'by_date' => 'map' => $view_fn); $client->storeDoc($design_doc); This one won't work (at least with my php version), you have to define map as an array. here is my version (tested on a couchdb -v 0.10.0 lighttpd 1.4.26 PHP 5.3.2) |
Feature/code coverage
Hi,
I read http://github.com/dready92/PHP-on-Couch/blob/master/doc/couch_client-view.md to create a view but the section:
$view_fn="function(doc) { emit(doc.timestamp,null); }";
$design_doc->_id = '_design/all';
$design_doc->language = 'javascript';
$design_doc->views = array ( 'by_date',$view_fn);
$client->storeDoc($design_doc);
should be:
$view_fn="function(doc) { emit(doc.timestamp,null); }";
$design_doc->_id = '_design/all';
$design_doc->language = 'javascript';
$design_doc->views = array ( 'by_date' => 'map' => $view_fn);
$client->storeDoc($design_doc);
otherwise it will not really create a view
The text was updated successfully, but these errors were encountered: