CouchDB: How to change view function via javascript? -


This "feasible" [1] + metadata for storing scientific data (simulated and experimental raw data) is CouchDB There is a schema-less perspective: We should be very flexible with metadata, because the set of parameters will change many times.

So far, I have some code to feed raw data, plot (as both attachments), and hierarchical metadata (as JSON) in Cochbi documents, and for printing and showing Some prototype javascript is written but filtered on client side (aka browser): The map function returns only everything.

How can I change the map function of a specific _design-document with a simple browser? -JS?

I do not think a temporary view will produce any display profit ...

Thank you for your time and answer.

[1]: Surely this is possible, but is it also useful? possible? Suitable?

[Added]

Ah, jquery.couch.js (version 0.9.0) provides a saveDoc () function, which will update _design document with new map function.

But I also tried out the query function, which uses a temporary view. Well, do not use it in the "real product, only during development ..." but scientific research is stable development, right?

Temporary ideas are being cached, as I have seen, and it works well for every 1000 ~ 1000 documents per DB. Another plus: All users (1 to 3 think about) , So a big user management exits one overkill) can work with their temporary view.

never use never temporary scenes; they are actually only gods And for debugging purposes. For more information, see (especially bold "note").

And of course, because the design documents are actually only documents with special powers, you can run GET / POST / PUT / DELETE ways on them. However, you will usually need administrator rights to do this. Therefore, if you are allowing a client side piece of software to do so, then you are making your entire database public to read / write - it's okay for your application, but it is important to remember.

Formerly, if you restrict access to your database, but you enter the username and password in the client-side JavaScript, then you can see any usernames and passwords.

Cheers.

Cheers.


Comments