Skip to content

Instantly share code, notes, and snippets.

@jvkumar

jvkumar/schema.jason

Created Nov 27, 2012
Embed
What would you like to do?
email template
template {
id: hash of (name,country,text,language,unixtimestamp)
name:
text:
html:
subject:
description:
country:
language:
is_active:
created_at:
modified_at:
}
Use validate_doc_update function (http://wiki.apache.org/couchdb/Document_Update_Validation) to check the uniqueness of (name,country,language,is_active)
Create, Edit and Delete Template
Template listing
@csm

This comment has been minimized.

Copy link

@csm csm commented Nov 28, 2012

A view for this would be something like this:

{
    "query" : { "map": "function(doc) { emit([doc.country, doc.language, doc.is_active]); }" }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment