nlight-jdev / jcouchdb

Automatically exported from code.google.com/p/jcouchdb
Other
0 stars 0 forks source link

support for "filters" and "validate_doc_update" in design documents #32

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Please add support for filters and validate_doc_update in the
CouchDBUpdater. It seems as if it currently only works with views, but it
could work more generic and also allow generic functions to be added to the
design doc.

Original issue reported on code.google.com by joschaf...@gmx.de on 21 Nov 2009 at 12:46

GoogleCodeExporter commented 8 years ago
what do you mean with filters?

validate_doc_update is supported as Java bean property ( 
getValidateOnDocUpdate() and
setValidateOnDocUpdate(String) )

Others can currently be set over the org.svenson.DynamicProperties interface the
DesignDocument inherits from BaseDocument.

Original comment by ff...@gmx.de on 21 Nov 2009 at 1:17

GoogleCodeExporter commented 8 years ago
oh..

misread that. 

It's not currently supported in CouchDB Updater. I was kind of planning to do 
that
and other things but I haven't yet found the time to do so.

Original comment by ff...@gmx.de on 21 Nov 2009 at 1:23

GoogleCodeExporter commented 8 years ago
With the CouchDBUpdater you can give a directory containing views, like:

views\some\byId.map.js
views\some\byId.reduce.js

so you can work on the JS files in your favorite editor, right?

but a design document can easily have all kinds of functions, like for example 
a 
"validate_doc_update" and several filter functions (see attached screenshot).

So my proposal would be:

designName\views\some\byId.map.js
designName\views\some\byId.reduce.js
designName\views\other\bla.map.js
designName\validate_doc_update.js
designName\filters\myfilter.js
...

Original comment by joschaf...@gmx.de on 21 Nov 2009 at 1:27

Attachments:

GoogleCodeExporter commented 8 years ago
ah, I see - I'd be willing to contribute to the project if you are interested 
in 
another two helping hands...

Original comment by joschaf...@gmx.de on 21 Nov 2009 at 1:28

GoogleCodeExporter commented 8 years ago
patches are always welcome ;) It's just that I'm in a very intense phase at my 
day
job that leaves me little time for other things. 

Initially I was planning to support a somewhat more relaxed way of accepting 
script
layouts. from the way that is currently implemented to the way it's currently 
done in
couchapp -- including maybe the !code and !json handling.

Original comment by ff...@gmx.de on 21 Nov 2009 at 1:34