dready92 / PHP-on-Couch

Data Access Library to access a CouchDB server with PHP.
http://dready.byethost31.com/index.php/display/view/192
GNU Lesser General Public License v3.0
246 stars 102 forks source link

implement a mehtod for _temp_view #58

Closed sebastianrakel closed 7 years ago

sebastianrakel commented 9 years ago

CouchDB has a function for temp Views, so you can send a function to the server and get the result, without store the view.

Example:

curl -H 'Content-Type: application/json' -X POST http://localhost:5984/example/_temp_view -d '{"map" : "function(doc) { if (doc.kdnr) { emit(doc.kdnr, doc.licencse); } }"}'

It is possible to implement this and get an array of docs back?

popojargo commented 7 years ago

Not supported with CouchDB 2.0. Mention me if you feel this should be still implemented even if CouchDB doesn't support it.