cozy / cozy-browser-sdk

Cozy Data System client for the browser
http://dev.cozy.io
MIT License
7 stars 12 forks source link

Rename defineMapReduceView into defineView #34

Closed aenario closed 7 years ago

aenario commented 7 years ago

Following changes of docs by @jacquarg

@nono we need a review, its for tonight's hackathon :-/

nono commented 7 years ago

@aenario the commit looks clean, but I'm not convinced it's a good thing to do that. defineView is used in cozy-client-js for mango indexes, and it's not the same syntax. I fear we create more complexity when moving an app from cozy-browser-sdk to cozy-client-js (execpt if you think that we can make defineView works for both mango and old-school views).

aenario commented 7 years ago

cozy-client-js has a defineIndex(doctype, [fields]) functions which is compatible with v2 & V3.

It does not have a defineView function, and if we add one, we will probably give it a scary name (defineFunctionalMapReduceView) to discourage its usage when a mango index would work as well.