Methods
create
Create a list of document ids in the collection named 'collection'. The funny name is due to the fact we're storing document ids from the notes collection in individual documents of the collection collection. i.e. we are creating (ordered) sets of documents identified with a document name.
The motivation for collections of docs collection is so that we can group documents together form display purposes. Form example, say I'm working on a project with multiple documents. I'd like to be able to "identify/tag" them to the project so I can narrow my viewing focus to just those documents.
read
Read a collection from the database.
update
Update a collection in the database.
delete
Delete a collection from the database.
get_all
Get all pages in the notes collection. Returns a MongoDB cursor one can iterate over.
collection_for_page
Get all the collection ids for which this page is a member of.
BUILD
Set the collection we want to work with. In this case it's the collection named 'collection'. It's a bit meta is why the funny naming.