DBCollection.distinctAndCount
on array fieldsDBCollection.distinctAndCount
on primitive like (ex.Number
,ISODate
, …) fields
toCSV
support for documents with nested fields
- Support aggregate framework changes in 2.6
- Add release version in startup message
DBCollection.distinctAndCount
on multiple fields
- Fixed CSV constructor without a name
- Initial documentation
- Fixed spec run on Travis
- Fixed npm install process
- Setup spec harness
- Setup continuous integration with
travis-ci
- User install process doesn't require to build the whole thing
- Fixed release process
DB#getCollections
- get all collections in current dbCollection#distinctAndCount
- count how many distinct valuesCollection#first
- first element inserted in collectionCollection#last
- last element inserted in collectionQuery#reverse
- reverse query sort orderQuery#first
- return only the first element in resultQuery#last
- return only the last element in resultQuery#tojson
- serialize query result using json format- CSV support
Query#tocsv
- serialize query result using csv formatQuery#printcsv
- print query result using csv formattocsv(x)
- serializex
using csv formatprintcsv(x)
- printx
using csv format
- JSONPath support
Query#select(x)
- filter result using jsonpath expressionx
jsonpath(o, x)
- filter objecto
using jsonpath expressionx
- Temporary collections
DB#collection(f)
- creates a temporary collection that will be available tof
and automatically destroyed immediately afterDB#getTemporaryCollections()
- get all temporary collectionsDB#dropTempraryCollections()
- drop all temporary collectionsCollection#isTemporary
- returns true if the collection is temporary
- Storable cursors
Query#save(c)
- save the query result into a collectionc
- Better time manipulation support using moment.js library
db.orders.find({created_at: moment.$today()})
- find orders created today, it will generate something like{$gte: ISODate('2014-02-25'), $lte: ISODate()}
db.orders.find({created_at: moment.$last(3, 'days')})
- find orders created in the last 3 daysmoment.last(30, 'days').forEach('day', function(m) { db.orders.count({created_at: moment.$inDay(m)}) })
- how many orders per day where created in the last 30 days