Skip to content

Commit a30d730

Browse files
committed
Release 0.2.6
1 parent 7b30610 commit a30d730

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mongodb-shell-extensions",
3-
"version": "0.2.5",
3+
"version": "0.2.6",
44
"description": "Useful MongoDB shell extensions",
55
"files": [
66
"src",

released/mongorc.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10244,7 +10244,7 @@ moment.fn.within = function(range) {
1024410244

1024510245
/* global chatty */
1024610246

10247-
chatty('\033[1;32m+ MongoDB Shell Extensions (0.2.5) by Gabriele Lana <gabriele.lana@gmail.com>\033[0m')
10247+
chatty('\033[1;32m+ MongoDB Shell Extensions (0.2.6) by Gabriele Lana <gabriele.lana@gmail.com>\033[0m')
1024810248

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

1035410354
DBQuery.prototype.reverse = function() {
10355-
if (!this._query.query || _.isEmpty(this._query.query)) {
10356-
this._query.query = {}
10357-
}
10355+
this._checkModify();
1035810356
if (!this._query.orderby || _.isEmpty(this._query.orderby)) {
10359-
this._query.orderby = {'$natural': 1}
10357+
this._addSpecial('orderby', {'$natural': 1});
1036010358
}
1036110359
for (var field in this._query.orderby) {
1036210360
this._query.orderby[field] = this._query.orderby[field] * -1

0 commit comments

Comments
 (0)