Simple mapping library for CouchDB
Flatpack provides some simple document modelling for CouchDB built on top of supercomfy CouchDB client. Flatpack will allow you to define a model, and will then create appropriate permanent views in CouchDB to allow for easy searching and retrieval of these documents, as well as creating a helper object which will allow you to easily manipulate documents of that type.
// Define a model with just the default view (getByType)flatpack;// Define a model with custom viewsflatpack;
// Create a documentvar customer = firstName: 'Nathan' lastName: 'Oehlman' company: 'Sidelab'customerdb = flatpack;// Save for the first timecustomerdb;
// Create a documentvar customerdb = flatpack;// Get the existing objectcustomerdb;