apache / nano

Nano is now part of Apache CouchDB. Repo moved to https://GitHub.com/apache/couchdb-nano
https://github.com/apache/couchdb-nano
Other
1.13k stars 157 forks source link

Example Lazy Creation of View #361

Open marco-bue opened 6 years ago

marco-bue commented 6 years ago

From the lazy view creation example code:

// some more logic needed // what if design document exists but view doesnt, we cant just overwrite it // // we need a way to fectch and build on // and thats the reason why im not doing this at 5am

I wanted to ask whether there is any other good, production-ready example for lazy view creation. Is it possible to efficiently detect view definition changes on lazy view creation to realize some kind of "Lazy view update"?

I am new to couchdb and nano, so I don't know yet how this could be implemented in a performant way. It would be nice to have a clean and performant example for this common task.

Thank you

BR Marco