How do I DRY up my CouchDB views?

后端 未结 5 845
甜味超标
甜味超标 2020-12-06 00:17

What can I do to share code among views in CouchDB?

Example 1 -- utility methods

Jesse Hallett has some good utility methods, including

fun         


        
5条回答
  •  甜味超标
    2020-12-06 01:03

    From the CouchDB Wiki:

    There are no development plans to share code/functions between views. Each view function is stored according to a hash of their byte representation, so it is important that a function does not load any additional code, changing its behavior without changing its byte-string. Hence the use-case for CouchApp.

提交回复
热议问题