0.4.4 • Published 12 years ago

mongosum v0.4.4

Weekly downloads
51
License
-
Repository
github
Last release
12 years ago

Mongolian Summary

Automatically maintain summary tables on Mongo collections

Mongolian Summary extends the Mongolian Deadbeef package such that any insert/update/remove call maintains a summary of the information in the table. This allows much easier min/max/sum operations on the collection as it is calculated during insertion.

Default Usage

mongo = require 'mongosum'
dbms = new mongo
db = dbms.db 'mydb'
coll = db.collection 'users'

coll.insert {name: 'Richard', age: 23}

New commands

// Get the summary of a collection
coll.getSummary(callback)


// Force a full refresh of the summary (this is a heavy operation, do it rarely)
coll.rebuildSummary(callback)

// Set the options on the summariser. Currently only suppors an "ignored_columns" array, for things like _id
coll.setSummaryOptions(options, callback)

// Alter the default summary options - if the collection does not have explicit options, it will use these.
// This is not written to the database, it must be refreshed on each instance.
dbms.defaultSummaryOptions(options)
db.defaultSummaryOptions(options) // writes to global default
coll.defaultSummaryOptions(options) // writes to global default
0.4.4

12 years ago

0.4.3

12 years ago

0.4.2

12 years ago

0.4.1

12 years ago

0.4.0

12 years ago

0.3.4

12 years ago

0.3.3

12 years ago

0.3.2

12 years ago

0.3.1

12 years ago

0.3.0

12 years ago

0.2.0

12 years ago

0.1.0

12 years ago