MongoBooster 3.3 is out

So happy to release MongoBooster 3.3 today. This version includes a few useful shell script extensions (cursor.getShellScript, cursor.saveAsView...) along with some useful minor improvements and bugfix.

shell script extensions

cursor.getShellScript()

Cursor.getShellScript() method return the MongoDB find shell script produced by the MongoBooster Fluent Query Builder.

For example:

Run the following Fluent query script in MongoBooster:

1
2
3
4
5
6
db.user.where('age').gte(18).lte(65)
.select('name age -_id')
.sort("-age name")
.limit(5)
.skip(100)
.getShellScript()

We got the following MongoDB shell find script

1
2
3
4
5
6
7
8
9
10
11
12
13
db.user.find({
"age" : {
"$gte" : 18,
"$lte" : 65
}
}, {
"name" : 1,
"age" : 1,
"_id" : 0
})
.sort({ "age" : -1, "name" : 1 })
.limit(5)
.skip(100)

Run the following aggregate Fluent Query script in MongoBooster:

1
2
3
4
5
6
db.companies.aggregate(qb.where('founded_year').gte(2000).lte(2010))
.group({_id:"$category_code",count:{$sum:1}})
.sort('-count')
.skip(100)
.limit(5)
.getShellScript()

We got the MongoDB shell aggregate script :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
db.companies.aggregate(
[
{
"$match" : {
"founded_year" : {
"$gte" : 2000,
"$lte" : 2010
}
}
},
{
"$group" : {
"_id" : "$category_code",
"count" : {
"$sum" : 1
}
}
},
{
"$sort" : {
"count" : -1
}
},
{
"$skip" : 100
},
{
"$limit" : 5
}
])

cursor.saveAsView()

Cursor.saveAsView() save find/aggregate cursor as a MongoDB readonly view. The method requires MongoDB 3.4 and above.

1
2
3
4
5
6
7
8
9
10
11
12
13
db.user.where('age').gte(18).lte(65)
.select('name age -_id')
.sort("-age name")
.limit(5)
.skip(100)
.saveAsView("user_view", {dropIfExists:true}) //drop view if it exists.

db.companies.aggregate(qb.where('founded_year').gte(2000).lte(2010))
.group({_id:"$category_code",count:{$sum:1}})
.sort('-count')
.skip(100)
.limit(5)
.saveAsView("companies_view", {dropIfExists:true}) //drop view if it exists.

cursor.getAggregationPipeline()

Cursor.getAggregationPipeline() return the aggregation pipeline produced by the MongoBooster Fluent Query Builder..

1
2
3
4
5
6
db.user.where('age').gte(18).lte(65)
.select('name age -_id')
.sort("-age name")
.limit(5)
.skip(100)
.getAggregationPipeline()

We got the following MongoDB shell aggregate pipeline:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
[
{
"$match" : {
"age" : {
"$gte" : 18,
"$lte" : 65
}
}
},
{
"$project" : {
"name" : 1,
"age" : 1,
"_id" : 0
}
},
{
"$sort" : {
"age" : -1,
"name" : 1
}
},
{
"$skip" : 100
},
{
"$limit" : 5
}
]

Minor UI Improvements

Aggregation ...

This version added a new handy "aggregate..." collection action to generate fluent aggregate template script.

MongoBooster Aggregate Menu Item

Update View ...

This version also added a new handy "Update View..." view action to drop and recreate MongoDB view.

MongoBooster Update-View

Minor Improvements and Bugfix

  • New, add "Copy Key/JSON Path(s) to Clipboard" item to the context-menu of tree/grid view. This action will return the full JSON path of the selected item. e.g. "object.array[0].subObj.field"
  • Fixed, Property 'xxx' does not exist on type '{}' warning.
  • Fixed, typings for ISODate constructor.
  • Fixed, Replica Set connection error withKerberos
  • Improved, add more display page size options [5, 10, 20, 50, 100, 200, 500, 1000, 2000]
  • Improved, resize app icon (the app icon on macOS is too large)

Thank you!

Please visit our feedback page or click the “Feedback” button in the app. Feel free to suggest improvements to our product or service. Users can discuss your suggestion and vote for and against it. We’ll look at it too.