Introduction to CouchDB with .NET part 14: list functions in design documents
June 14, 2017 Leave a comment
Introduction
In the previous post we looked at validation functions in CouchDB design documents. A validation function is used for data validation when inserting a new document or updating an existing one. It is called automatically upon an insert or update operation. We saw how to write a function that checks particular properties in the incoming document and throws an exception if it violates some business rules. We can also check whether the user executing the modification has a certain username or is in a user role, i.e. whether they are authorised to perform the action.
In this post we’ll look at lists in design documents.