Announcing NoSQLBooster 4.7!

Today we're happy to bring you NoSQLBooster 4.7. We've got a few new items that we’re proud to highlight! Optimizes connection management, making the new shell open more smoother, enhanced Object Explorer (Users and Roles node, Collection Schema and validator), watch Collection/Database/Deployment data changes, new SQL Functions(type conversion, string operations,date operations) and MongoDB ObjectId ↔ Timestamp Converter ...

Let’s dive in and get an overview of what’s coming in NoSQLBooster 4.7!

Hotfix

Hotfix in 4.7.5

  • Fixed, DBRef is missing $ref, $id, $db attributes #ref
  • Fixed, Cannot use Object.bsonsize bug #ref
  • Fixed, in the case of mixed Chinese and English input, the font is not displayed correctly bug
  • Fixed, a Minor Python Query Code Generator bug
  • Fixed, faker.finance.amount method stackoverflow bug
  • Fixed, "NumberLong","NumberDecimal" method typing definition issue
  • Fixed, View/Download files in GridFS collection, fails on Windows when file name contains braces / colon issue #ref
  • Changed, set the default export batchsize value to 1000

Hotfix in 4.7.3 and 4.7.4

  • Added, Add %%database%% variable to default collection window template #ref
  • Fixed, NumberLong conversion fails for negative numbers #ref
  • Fixed, regression "search using uuid helpers" bug #ref
  • Fixed, regression "table view header breaks the columns of the table when column name contains commas" bug. #ref

Hotfix in 4.7.2

The release 4.7.2 is a minor update, it is mainly to speed up the opening of the Script editor, modify default code template for opening collection.

  • Improved, speed up the opening of the Script editor
  • Changed, append running script indicator to output panel
  • Added, option: "AutoExecute Script When Collection Node is Double-Clicked", toggle this option to enable/disable auto-execute script when collection/view node is double-clicked.
  • Fixed, connect mongodb+srv URI using SSH tunnel #ref
  • Fixed, UUID function without arguments returns an error #ref
  • Fixed, table view header breaks the columns of the table when column name contains commas. #ref

Hotfix in 4.7.1

  • Fixed, Cut/Copy/Paste in editor context menu doesn't work with MacOS. #ref
  • Fixed, the ability to increase the paging size does not work correctly.

Optimizes Connection Management

In previous versions, each tab has an embedded MongoDB shell, and each embedded Shell will acquire an exclusive MongoDB client connection, the main purpose of this is to simplify programming and debugging, but the simple one-tab-one-connection model wastes connection resources and slows the opening of new tab. In the new version, we use an all-application shared connection pool, the multiple-tabs-one-connection mechanism can greatly improve the efficiency of "open tab", makes the application's UI response smoother. Please download to give it a shot now.

Enhanced Object Explorer

NoSQLBooster 4.7 greatly enhanced Object Explorer, new global user and role nodes, new collection schema and validator nodes, database node's storage size ...

Database object explorer

Database Object Explorer

User and Roles Management

User and Roles Management

MongoDB 4.0 support

New SQL Functions, Type Conversion, String Operations, Date Operations

MongoDB 4.0 adds many new aggregation operators for type conversion, string operations and date operations. NoSQLBooster 4.7 allows new MongoDB 4.0 aggregation operators are available for NoSQLBooster SQL Query in the form of SQL Functions.

Type Conversion

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
mb.runSQLQuery(`

SELECT toInt('20') as int,
toBool('true') as bool,
toDate('2018-01-01') as date,
convert('20','long',onError='error', onNull=null) as long, //named parameters
convert(null,'int',onError='error', onNull=null) as intOnNull,
convert('abc','int','error', null) as intOnError
FROM testCollection
`).limit(1)

//output
{
"_id" : ObjectId("5b24b34c1456d826b8a5e05e"),
"int" : 20,
"bool" : true,
"date" : ISODate("2018-01-01T00:00:00.000Z"),
"long" : NumberLong("20"),
"intOnNull" : null,
"intOnError" : "error"
}

String Operations

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
mb.runSQLQuery(`

SELECT trim(' abc ') as trim,
trim(' ggggoodbyeeeee', chars='ge') as trimChars,
ltrim(' abc ') as ltrim,
rtrim(' abc ') as rtrim
FROM testCollection
`).limit(1)

//output
{
"_id" : ObjectId("5b24b34c1456d826b8a5e05e"),
"trim" : "abc",
"trimChars" : " ggggoodby",
"ltrim" : "abc ",
"rtrim" : " abc"
}

Date Operations

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
mb.runSQLQuery(`

SELECT dateToString(format='%Y-%m-%d %H:%M:%S:%L%z', date='$hire_date', timezone='+08:00') as dateStr,
dateToParts("hire_date",'+08:00') as dateParts
FROM employees
`).limit(1)

//output
{
"_id" : ObjectId("597829d858319165c841708b"),
"dateStr" : "2016-01-02 08:00:00:000+0800",
"dateParts" : {
"year" : 2016,
"month" : 1,
"day" : 2,
"hour" : 8,
"minute" : 0,
"second" : 0,
"millisecond" : 0
}
}

Better yet, all SQL Functions provide the appropriate code snippets and mouse hover information and support code completion

SQL Function Code Complete

Watch Database/Deployment Data Changes

Starting in MongoDB 4.0, you can open a change stream cursor for collection, database or deployment (either a replica set or a sharded cluster) to watch for data changes. In NoSQLBooster 4.7, We have also added UI and code snippet which allow you to watch database/deployment data changes with a few clicks.

Right-click the database node, pop up context menu and select the "Watch Database (MongoDB 4.0+)"

Watch Database

Right-click the connection node, pop up context menu and select the "Watch Deployment (MongoDB 4.0+)"
Watch Deployment

Minor Improvements

Added More Options for Formatting Dates

Display DateTime in

MongoDB ObjectId ↔ Timestamp Converter (Javascript Functions)

NoSQLBooster 4.7 adds two new tool functions for ObjectId ↔ Timestamp conversion.

1
2
3
4
5
6
7
export var objectIdFromDate = function (date) { //convert date to objectId
return new ObjectId(Math.floor(date.getTime() / 1000).toString(16) + "0000000000000000");
};

export var dateFromObjectId = function (objectId) { //convert objectId to date
return objectId.getTimestamp()
};

Why generate an ObjectId from a timestamp?

Each MongoDB ObjectId contains an embedded timestamp of its creation time, to query documents by creation date.

e.g. to find all comments created after 2013-11-01:

1
2
3
4
5
//NoSQLBooster fluid query
db.comments.where("_id").gt(objectIdFromDate(ISODate("2013-11-01")))

//or
db.comments.find({_id: {$gt: objectIdFromDate(ISODate("2013-11-01"))}})

More about this topic, please refer to: mongo-object-time

Auto-update on Linux

In addition to Windows and Macs, NoSQLBooster 4.7 adds auto-update feature on Linux . The auto-updates feature enable NoSQLBooster to automatically update itself, so your copy will always be up-to-date.

Bugfix

  • New, close current active windows/tab/dialog using the shortcut key (CMD + W)
  • Fixed, TTL with 0 seconds doesn't create the script correctly. #ref
  • Fixed, no context menu to cut/copy/paste/delete in document values tree view. #ref
  • Fixed, SQL translate bug "SELECT toInt(category_id) as category FROM categories where category > 20"
  • Changed, "Open and edit" action -> "Open Connection Editor" in "From URI..." dialog

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.