couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Shorin <kxe...@gmail.com>
Subject Re: [PROPOSAL] Allow rewrites to be JS function
Date Mon, 28 Sep 2015 15:37:18 GMT
On Mon, Sep 28, 2015 at 11:22 AM, Jason Smith <jason.h.smith@gmail.com> wrote:
>
> 1. Basically swap the current system with Perl-compatible URL rewrites. So
> if you know Perl or sed, now you can rewrite couch requests.

vmx proposed usage regexp in rewrite rules long time ago:
https://pony-poc.apache.org/thread.html/8a6efdbc45bc9c700ff79ab4677c9cf39c147e7a73742fcec2ab268e@%3Cdev.couchdb.apache.org%3E

But it also makes harder to read such rules. Same problem will suffer
PCRE-based rewrites: some basic transformations are simple, something
more complex will require more resources to write and to understand
after sometime. I don't talk about how to debug and test rewrite rules
- that's separate sad topic. Support of Javascript functions will
solve these issues with easy.

--
,,,^..^,,,

Mime
View raw message