You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Diana Thayer <ga...@gmail.com> on 2021/07/22 19:27:21 UTC

Introducing: PouchDB-JsonViews, a JSON-based map/reduce interface

Howdy folks,

Inspired by Mango, I've written a plugin for PouchDB that adds a JSON-based
map/reduce interface called *JsonViews*. This plugin, called
PouchDB-JsonViews, allows you to build templated JavaScript views using a
simple document property accessor syntax (ex: 'foo', 'foo.bar'), a small
number of transforms, and a `splay` option for unrolling arrays.

This interface works against PouchDB and CouchDB alike! Hopefully it will
save you some headaches debugging unruly views by replacing them with
descriptive JSON rather than programmatic JavaScript. Under the hood,
PouchDB-JsonViews compiles JsonViews into JavaScript functions. This
compilation process is well-tested, with 100% test coverage.

You can read more about it on GitHub:
https://github.com/garbados/pouchdb-jsonviews

Let me know what you think :)

Best regards,
Diana

Re: Introducing: PouchDB-JsonViews, a JSON-based map/reduce interface

Posted by Bill Stephenson <bi...@cherrypc.com.INVALID>.
That does sound cool! I'll have the check out asap.

Thank you!

On 7/22/21 2:27 PM, Diana Thayer wrote:
> Howdy folks,
>
> Inspired by Mango, I've written a plugin for PouchDB that adds a JSON-based
> map/reduce interface called *JsonViews*. This plugin, called
> PouchDB-JsonViews, allows you to build templated JavaScript views using a
> simple document property accessor syntax (ex: 'foo', 'foo.bar'), a small
> number of transforms, and a `splay` option for unrolling arrays.
>
> This interface works against PouchDB and CouchDB alike! Hopefully it will
> save you some headaches debugging unruly views by replacing them with
> descriptive JSON rather than programmatic JavaScript. Under the hood,
> PouchDB-JsonViews compiles JsonViews into JavaScript functions. This
> compilation process is well-tested, with 100% test coverage.
>
> You can read more about it on GitHub:
> https://github.com/garbados/pouchdb-jsonviews
>
> Let me know what you think :)
>
> Best regards,
> Diana
>
-- 

Kindest Regards,

Bill Stephenson
Tech Support
www.ezInvoice.com
1-417-546-8390


Re: Introducing: PouchDB-JsonViews, a JSON-based map/reduce interface

Posted by Nick Vatamaniuc <va...@gmail.com>.
That's really neat! Thanks for sharing. It feels like this could cover
a larger number of cases where users don't really need the full JS
syntax for their views

Cheers,
-Nick

On Thu, Jul 22, 2021 at 3:28 PM Diana Thayer <ga...@gmail.com> wrote:
>
> Howdy folks,
>
> Inspired by Mango, I've written a plugin for PouchDB that adds a JSON-based
> map/reduce interface called *JsonViews*. This plugin, called
> PouchDB-JsonViews, allows you to build templated JavaScript views using a
> simple document property accessor syntax (ex: 'foo', 'foo.bar'), a small
> number of transforms, and a `splay` option for unrolling arrays.
>
> This interface works against PouchDB and CouchDB alike! Hopefully it will
> save you some headaches debugging unruly views by replacing them with
> descriptive JSON rather than programmatic JavaScript. Under the hood,
> PouchDB-JsonViews compiles JsonViews into JavaScript functions. This
> compilation process is well-tested, with 100% test coverage.
>
> You can read more about it on GitHub:
> https://github.com/garbados/pouchdb-jsonviews
>
> Let me know what you think :)
>
> Best regards,
> Diana