Skip to content

Commit

Permalink
Release 0.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielelana committed Dec 12, 2014
1 parent 7b30610 commit a30d730
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mongodb-shell-extensions",
"version": "0.2.5",
"version": "0.2.6",
"description": "Useful MongoDB shell extensions",
"files": [
"src",
Expand Down
8 changes: 3 additions & 5 deletions released/mongorc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10244,7 +10244,7 @@ moment.fn.within = function(range) {

/* global chatty */

chatty('\033[1;32m+ MongoDB Shell Extensions (0.2.5) by Gabriele Lana <[email protected]>\033[0m')
chatty('\033[1;32m+ MongoDB Shell Extensions (0.2.6) by Gabriele Lana <[email protected]>\033[0m')

DBCollection.prototype.last = function(n) {
return this.find().sort({_id: -1}).limit(n || 1)
Expand Down Expand Up @@ -10352,11 +10352,9 @@ var tocsv = (function() {
})()

DBQuery.prototype.reverse = function() {
if (!this._query.query || _.isEmpty(this._query.query)) {
this._query.query = {}
}
this._checkModify();
if (!this._query.orderby || _.isEmpty(this._query.orderby)) {
this._query.orderby = {'$natural': 1}
this._addSpecial('orderby', {'$natural': 1});
}
for (var field in this._query.orderby) {
this._query.orderby[field] = this._query.orderby[field] * -1
Expand Down

0 comments on commit a30d730

Please sign in to comment.