User Manual

Version 2.2.0

Table of Contents

This guide covers, how to use Nosqlclient. Each section in here is marked as one of Novice/Proficient/Expert levels, based on how deep knowledge is required to understand section content.

You can just use CTRL+F, since this is a single page documentation. If you still can't reach what you're looking for (after checking this guide and it's details) you can send a support e-mail with the details of what you're looking for to info@mongoclient.com

Check all features of nosqlclient, click here

Glossary

Novice Section

There're some keywords you need to know before using Nosqlclient and before reading this guide to understand fully what you're doing. This section is more likely for beginners, if you wish, you can pass to next section

The explanations here are partially excerpt from MongoDB official documentation. It's highly recommended to read detailed explanation from there.

# Keyword Description
1 Connection A Connection in Nosqlclient is a combination of settings that are required to connect to a MongoDB. Some of these settings are authentication type, hostname, port, db name, password, username etc.
2 Bson MongoDB represents JSON documents in binary-encoded format called BSON behind the scenes. BSON extends the JSON model to provide additional data types, ordered fields, and to be efficient for encoding and decoding within different languages.
3 Extended Json JSON can only represent a subset of the types supported by BSON. To preserve type information, MongoDB adds some extensions to the JSON format, and Nosqlclient takes advantage of these extensions for queries.
4 Document MongoDB stores data records as BSON documents, a document is analogous to a row in relational databases.
5 Collection MongoDB stores documents in collections. Collections are analogous to tables in relational databases.
6 Shell The mongo shell is an interactive JavaScript interface to MongoDB. As some people may prefer to work with shell, Nosqlclient offers the same shell with auto completion feature.
7 Aggregation Aggregation operations process data records and return computed results. Nosqlclient offers a nice intuitive tool to combine/reorder and execute aggregation stages of MongoDB.
8 Indexes Indexes support the efficient execution of queries in MongoDB. Without indexes, MongoDB must perform a collection scan, i.e. scan every document in a collection, to select those documents that match the query statement. You can easily see and manage your indexes (with their usages) via Nosqlclient.
9 Administration Nosqlclient has a section for administration operations in MongoDB, these are user management, dump/restore/import, and some sort of administration queries
10 Database Stats If you have the required privileges, Nosqlclient offers nicely designed charts to show your operations, memory, active read/writes and some other statistics These are explained more briefly in below sections. You may prefer to skip these, if you're not familiar with administration
11 Schemaless MongoDB is a JSON-style data store. The documents stored in the database can have varying sets of fields, with different types for each field. You can read more here
12 Schema Analyze Since MongoDB is a schemaless database, you may want to know what's the structure of your collection, and the distribution of the fields and their types. Nosqlclient uses variety to show these to you.
13 Stored Functions There is a special system collection named system.js that can store JavaScript functions for reuse, here you can use Nosqlclient to manage these functions with a few clicks.
14 Query Nosqlclient lets you to pick one of the queries regarding your wish whenever you choose a collection from left panel, some of these are find, findOne, updateMany, delete, count, insertMany...
15 Query Option Most of the queries has it's own options that you can pick in Nosqlclient. For example find query includes options such as sort, projection, limit etc
16 Selector Most of the queries like find, update needs a document or array of documents to match your query from the collection, selector is a document or array of documents regarding the selected query.
17 Mongod/Mongos Mongod is the primary daemon process for the MongoDB system, and Mongos is a routing service for sharding. Read here for further information
18 Connection URL To connect a mongod/mongos instance, you can create a URL and use it in MongoDB shell or in Nosqlclient, you can read more from here about URL formats

Nosqlclient Features

Multiple Levels Section (Novice/Proficient/Expert)

Nosqlclient has been designed by emphasising on end user's need, so it offers an intuitive design and lets you to query your database with a few clicks. There's no over-thought-out buttons or labels anywhere.

Nosqlclient is a combination of two panels at its simplest. Left panel keeps feature menus, your collections, and shortcuts. Right panel keeps the content of the selected menu from the left side.

This section includes multiple level information about Nosqlclient and MongoDB, you can see these levels near the title of the corresponding section.

Connections (Novice Level)

When you first deploy, install or open Nosqlclient an empty screen with two buttons at right upper corner welcomes you.

screenshot

To create a connection you need to click button.

There you you create a new connection and connect to your mongod/mongos instance, you'll see a modal window that will let you to do these processes

screenshot

In this modal window, there's a table that shows you your connection list, a Create New button to create connections, and Connect Now button to connect to your database instance.

Add Connection

As soon as you press the Create New button on connections modal You'll see a new modal window that lets you to create a new connection. In this window there're two fields at the very top of the modal window, and there's a tab view below them

Below, you can find explanation of the tabs that's placed in this modal window.

screenshot
1. Connection Name & Url

Connection Name is just like a reminder for you, it will be shown in the table of connections modal window. But it's optional to giving a name to your connection.

Connection URL lets you to use your URL instead of entering all parameters to connect to your instance. As a huge flexibility, Nosqlclient fills possible parameters as read-only in the tabs whenever you enter the connection url. There's an example URL below that will fill the options in the list after it.

mongodb://db1.example.net,db2.example.net:2500/?replicaSet=test&connectTimeoutMS=300000

  1. Host db1.example.net with port 27017
  2. Host db2.example.net with port 2500
  3. Replica set name as test
  4. Connection timeout as 300000
2. Connection Tab

Host is the server address that mongod instance is running on

Port is the port of server address that mongod instance is running on, by default it's 27017

Database Name is database that you want to connect, it's required for Nosqlclient since Nosqlclient depends on this name for some features. You can switch to another database anytime after you connect.

3. Authentication Tab

MongoDB supports a few authentiation types, and Nosqlclient supports all of them including enterprise authentication types

  1. Scram SHA-1
  2. Mongodb-CR
  3. X509
  4. Kerberos (GSSAPI)
  5. LDAP (Plain)
3.1. Scram SHA-1

SCRAM-SHA-1 is the default authentication mechanism for MongoDB >= 3.0. There're three fields to fill for this authentication type

Username, password and authentication database. Authentication DB is the database where the user was created, and together with the user’s name, serves to identify the user. You can leave it empty if user is defined in the database that you wish to connect

Within 2.2.0 and higher versions, you may leave username or password empty, nosqlclient will prompt for them while connecting.

3.2. MongoDB CR

MongoDB CR was the default authentication mechanism for MongoDB < 3.0. There're three fields to fill for this authentication type just like Scram-SHA-1

Within 2.2.0 and higher versions, you may leave username or password empty, nosqlclient will prompt for them while connecting.

3.3. X509

Starting from version MongoDB >= 2.6, MongoDB supports x.509 certificate authentication for client authentication and internal authentication of the members of replica sets and sharded clusters. X.509 certificate authentication requires a secure TLS/SSL connection, and Nosqlclient provides secure connection.

Username field indicates the subject from the certificate

Root CA File field keeps the certificate that should be used to validate server certificate.

Certificate is for the presenting current client certificate

Passphrase should be filled if client's certificate has one, otherwise can be empty

Certificate Key File is for the private key if client has one

Disable Hostname Verification, by default, Nosqlclient ensures that the hostname included in the server’s SSL certificate(s) matches the hostname(s) provided in the URI connection string. If you need to disable the hostname verification, but otherwise validate the server’s certificate check this. This behaviour comes from NodeJS MongoDB Driver

3.4. Kerberos (GSSAPI)

Contact us by sending a mail to info@mongoclient.com for more info about this enterprise type authentication

3.5. LDAP (Plain)

Contact us by sending a mail to info@mongoclient.com for more info about this enterprise type authentication

4. SSL Tab

MongoDB & Nosqlclient supports using SSL even without X509 authentication. If you're already using X509 authentication this tab will be disabled automatically since internally it will use SSL for X509 Fields that's placed here are the same as X509 authentication

5. SSH Tab

Nosqlclient supports SSH tunneling for your connections, but in SSH tunneling connections you can't use Dump section for now. Enabling SSH tunnel changes nothing for the other options, so you need to fill other connection options and tabs just like you're connecting to your local mongodb instance.

Hostname is the server address that mongodb instance is running on.

Port is the port of the server address that mongodb instance is running on.

Destination Port is the port of the remote mongod/mongos instance

Local Port is local port to bind for ssh tunneling, should be set same with the first tab

Username is the username that you want to use while connecting to server that mongodb instance is running on.

Authentication, you can select either connecting via a private key or password.

6. Options Tab

These are the options for connection, such as connection/socket timeout, replica set name etc...

Connection Timeout is the time in milliseconds to attempt a connection before timing out. This overrides Nosqlclient's default settings

Socket Timeout is the time in milliseconds to attempt a send or receive on a socket before the attempt times out. This overrides Nosqlclient's default settings

Username is the username that you want to use while connecting to server that mongodb instance is running on.

Replica Name, if you're trying to connect to a replica set, you must enter this to make Nosqlclient aware of it.

Read Preference field specifies the replica set read preference for this connection.By default it's set to primary

Connect With No Primary, this flag lets you to connect your replica set even if there's no primary is up at the moment

Settings (Proficient Level)

Nosqlclient has its own settings which can be set when either you're connected to a connection or disconnected

You may want to change nothing here if you're a beginner

  • Max allowed fetch size for FIND query

    With this settings you can prevent no limit FIND queries, and restrict these queries to given size as MB, 0 = No restriction

  • Socket timeout

    This settings is the time in milliseconds to attempt a send or receive on a socket before the attempt times out, and is being used for every connection unless it's overriden by the connection options, 0=No timeout

  • Connection timeout

    This settings is is the time in milliseconds to attempt a connection before timing out, and is being used for every connection unless it's overriden by the connection options 0=No timeout

  • Database statistics scheduler

    Nosqlclient populates database stats charts at this interval it's in miliseconds

  • Size information in

    At certain sections, Nosqlclient shows size information, you can switch these information between KB, MB or bytes.

  • Default result view

    Nosqlclient uses JSONEditor and ACEEditor to show result views, you can change the default result view with this setting

  • Autocomplete samples count

    Nosqlclient takes random samples and clarifies auto complete fields with those, you may set whatever count you want for samples, 0 disables auto complete.

  • Autocomplete shortcut

    Change auto complete shortcut with this setting, by default it's Ctrl-Space. This setting is also being applied at shell section. Combinations should be separated by dash.

  • Single tab for results

    By default each query execution opens another tab, you can change this behaviour by enabling this

  • Show live chat

    Enable live support from inside of Nosqlclient !

  • Show database statistics

    To prevent querying database at regular intervals at the database stats page for statistics, you can disable this feature

  • Max. chart points

    Database stats charts have certain number of points which can be changeable via this setting, by default it's 15

  • Mongo binaries path

    Nosqlclient uses native mongo binaries for dump, shell, schema analyzer sections, unless you're using docker you need to set binary path to here. E.g. /home/sercan/my_apps/mongodb3.4/bin

Switch Database (Novice Level)

Nosqlclient depends on database name for especially user management section, therefore you can connect to only one database at once. But switching to another database is just two click away from you after connecting to your connection.

screenshot

After clicking More -> Switch Database button you'll be able to select any of the databeses from the table, or you can write down a new database name to input field below of the table. Nosqlclient uses input field's value. To fetch databases Nosqlclient executes listDatabases query.

Import/Export Nosqlclient Data (Novice Level)

If you prefer to use desktop distribution of Nosqlclient, you may want to keep your connections and settings for each update of Nosqlclient. With Export Nosqlclient Data button you can export your connections and settings, and import them to another version by choosing Import Nosqlclient Data Docker build is always a better choice to use Nosqlclient

Database Stats (Expert Level)

Useful Tip

You can zoom in/out or change position of any chart, via mouse wheel and dragging.

Nosqlclient queries your database at regular intervals to populate performance charts and tables at the Database Stats page

This feature can be disabled, or regular interval can be configured at settings
screenshot

You can find detailed information about how these charts are being populated below. All charts data comes from serverStatus query of mongodb

Collections Read/Write table shows calculated data that comes from top query by Nosqlclient.
Read column is being calculated with the following formula: (readTime - previousReadTime) / (readCount - previousReadCount)
Write column is being calculated with the following formula: (writeTime - previousWriteTime) / (writeCount - previousWriteCount)

User Management (Proficient Level)

You can either manage your admin or connected database's users/roles in Nosqlclient. If you check right upper corner checkbox, and click Refresh button at the very bottom of the page, it means you've switched to admin database instead of the current. User management tree is being populated via executing command { usersInfo: 1, showCredentials: true } on the mentioned database. You can read more about this command by following here
Nosqlclient crawls latest documentation for you from the MongoDB official documentation whenever you click one of the role, resource or privilege elements from the tree. So you don't have to search MongoDB documentation all the time.

screenshot

There will be different menus at the right upper corner regarding the selected element from the user tree.

  • Selecting database

    With this selection you can see and use Manage Roles, and Manage Users buttons

  • Selecting user

    With this selection you can see and use Edit User button

Useful Tip

You can add custom values to most of the comboboxes in user management section by typing your value in the combobox's input and pressing Enter. Also you can de-select a value by pressing

Manage Roles

To populate table that's placed in the Manage Roles window, Nosqlclient executes { rolesInfo: 1, showBuiltinRoles: true } on the database (admin/selected). Click here for more info about this command.

In this section, you can do following actions.

  • Edit custom role, (built-in roles can not be edited)

    You can add new, delete or edit existing privileges within this section. Whenever you click the icon for a custom role, Nosqlclient executes { rolesInfo: {role: roleName, db: dbName}, showPrivileges: true} command on the selected database. This section have two tabs, privileges and roles to inherit

    Privileges

    If you click one of the Add Privilege or (Edit Privilege) buttons, you'll see another window that includes three comboboxes.
    DB / Resource combobox is being filled by list databases command which is being executed against admin
    Collection combobox is being filled whenever a database is selected from DB / Resource combobox by list collections command.
    Actions combobox is being filled by crawling MongoDB official documentation, but no worries, this crawling operation happens once, and Nosqlclient caches these actions in it's MongoDB to show afterwards.

    Roles to Inherit

    Every role in MongoDB can inherit multiple roles, by clicking Add Role to Inherit button you'll see another window that has two comboboxes.
    Database combobox is being filled by list databases command which is being executed against admin
    Role combobox is being filled by executing command { rolesInfo: 1, showBuiltinRoles: true } on the mentioned database.
    When you click Add at Add Role to Inherit window, you'll realize window won't disappear, that's because you can select and add more roles on-the-fly and nothing will be saved unless you close this window and click Save in the previous window.

  • Delete custom role, (built-in roles can not be deleted)

    Nosqlclient executes {dropRole: roleName} on the mentioned database to drop role, you can read more about this command by clicking here. To delete a role you need to select a role from the table and click button.

  • Add custom role

    This section is same as editing a custom role except in here you can add a new role instead of editing existing one. To reach this section, you need to click Add Role button from the Manage Roles window

Manage Users

To populate table that's placed in the Manage Users, Nosqlclient executes { usersInfo: 1, showCredentials: true} on the database (admin/selected). Click here for more info about this command.

In this section, you can do following actions.

  • Edit user

    Editing user is possible either clicking after selecting a user from the table that's placed in the Edit User window, or selecting user from the user tree and clicking Edit User button from the right upper corner. You can edit user's roles or custom data as it's placed in different tabs in the Edit User window.
    Changes in this section will be applied after you click the Save button, Nosqlclient executes updateUser command to save user. Click here for more info.

    Username & Password

    To change the username or password of selected user you need to fill input fields at the top of Edit User window. If you leave password input empty, password won't be updated by Nosqlclient

    Roles

    You can delete existing roles of user by selecting a role from the table and clicking .
    Add Role button shows a new window that lets you to add a role either by selecting from a table or selecting database and role from the top of window. In this section, table and top two comboboxes (database, role) are being populated by commands rolesInfo and listDatabases, click here for rolesInfo, and click here for listDatabases.

    Custom Data

    You can assign a custom data object to user, custom data objects valid for MongoDB >= 2.6

  • Show custom data

    If you don't need to change anything of user, you can see user's custom data by clicking after selecting a user from the table in the Manage Users window

  • Delete user

    Nosqlclient executes {dropUser: userName} on the mentioned database to drop user, you can read more about this command by clicking here. To delete a user you need to select a user from the table and click button.

  • Add new user

    This section is same as editing a user except in here you can add a new user instead of editing existing one. To reach this section, you need to click Add User button from the Manage Users window

Dump/Restore/Import (Novice Level)

screenshot

Within 2.2.0 and higher versions, nosqlclient uses mongo binaries for dump, restore, import and export. Therefore no need to worry about any issue that can be caused by nosqlclient.

Each section has it's own arguments which can be selected by choosing one or entering new. Per selection you may see a new input field regarding your argument, or there can be no input if it doesn't need any.

You need to set those binaries path from settings, unless you're using docker edition, it's packaged with binaries.

File Management (Novice Level)

Nosqlclient comes with ease of managing your GridFS collections with a few clicks, instead of queries. At the file management section, you can download, upload, delete, filter your files with the buttons.

screenshot

In this section you can delete multiple files that match with the entered selector by clicking Delete button, or refresh file list which has been populated at the below table by clicking Refresh button. Following actions happening here at the behind the scenes. Deletion of files happens in order removing from bucketName.files and bucketName.chunks collections internally.

  • Listing and filtering files

    To fetch and filter files, Nosqlclient executes find query on the selectedBucket.files collection

  • Showing and editing file information

    This works exactly same as listing and filtering files , so when you try to see a file information by selecting a file from table and clicking Nosqlclient executes findOne and for the save process executes updateOne queries.

  • Deleting a file

    Differently from above operations, Nosqlclient calls delete operation for the selected file's id on GridFS level, so you don't have to worry about .files and .chunks collections. To delete a file you need to select a file from table and click button

  • Downloading a file

    Nosqlclient sends you to a new route download with the parameters fileId and bucket name and starts piping bytes to you to download a file. This is a low level operation and uses streams behind the scenes. To download a file you need to click button after selecting a file from the table

  • Upload a file

    To use Upload button you need to select a file from the input first. After you'll see a message which asks you, if you want to keep uplaoding or not. If you answer this question yes then you can manually fill other informations of your GridFS file before uploading it. Nosqlclient pipes stream to your database's GridFS bucket to upload a file. Before uploading you can fill fileName, contentType, metaData, aliases information.

Index Management (Expert Level)

Nosqlclient has a very unique way to manage indexes. Each index type is being coloured differently and you can add new indexes with a few click without struggling design obstacles and queries. Changing collection from the combobox refreshes the indexes list. These collections comes from the active database connection

screenshot

You can find what's happening behind the scenes for this section at below.

  • Listing indexes

    Nosqlclient executes three queries to populate whole data of index management section. These are getIndexes to get index names and properties, stats to get index sizes, indexStats aggregation to get index usage statistics (MongoDB >= 3.2)

  • Viewing an index

    After selecting an index from table and clicking button, you'll be able to see the details of the index in an another window. Nosqlclient executes getIndexes with the selected index name to fetch these details.

  • Viewing index as raw

    This works same as viewing an index, except instead of populating UI, shows the raw JSON data. You can reach this raw json by clicking button after selecting an index from the table

  • Dropping index

    If you click button, Nosqlclient executes dropIndex to drop the selected index.

  • Adding index

    Add Index button that's placed at the very bottom of the page, lets you to add a new index. In the opened window there are four tabs. And only general has two fields that are required, all other tabs have optional options.
    General tab lets you to specify index name (required), select fields with their types (at least one field is required), and select index properties (optional).
    Text Options tab has the options for the text index, if you've selected one in the General tab
    Geo Options tab has three sections for three types of geo indexes of MongoDB (2D, 2D Sphere, Geo Haystack), each section has related options and only valid if you've selected the corresponding type of index from the General tab
    Collation is valid only for MongoDB >=3.4, you can read more from here

Admin Queries (Expert Level)

Nosqlclient separates queries as Admin and Normal queries. If you're a developer and want to just query your database, you have nothing to do with this section.

These queries can only be executed if you have the necessary privileges. Some of these queries can be executed on the admin database instead of the currently connected database. To do that you simply need to check right upper corner checkbox. Checked = execute on the admin database

If you don't like JsonEditor, you can switch to AceEditor instead, by clicking button that's placed at the right upper corner. Default result view can be changed via settings

Below, you can find following MongoDB queries that Nosqlclient executes for the corresponding admin query.

Queries

Shell (Novice Level)

MongoDB offers a nice shell if you're familiar with linux or mac terminal, it's a nice feature to have such a tool. But lack of syntax highlighting and auto completion can be a huge disadvantage, Nosqlclient changes this disadvantage to advantage for its users.

CTRL+SPACE on the shell can be used for auto completion.
ENTER button executes the query.

Nosqlclient internally brings MongoDB shell (for linux/windows/osx) for this feature, and current version of the shell is v3.4.4 But a new binary can be assignable through settings for the shell and schema analyzer, just in case if you want to use a different version or using a different OS.

Aggregate (Proficient Level)

Aggregation pipeline of MongoDB is a combination of the stages which you can read more about them here

Nosqlclient comes with a tool that lets you to execute your aggregation pipeline at any stage level, re-order stages and add as many as stages you wish.

To add a new stage, you need to select a collection and a stage from the comboboxes that's placed at the very top of the page.
To re-order stages you can drag & drop a stage panel between all stages.
To remove a stage, you can click button that's placed at the right upper corner of the corresponding stage panel.

With version 2.1.0 and higher versions, you can now see histories of your aggregation pipelines and use those. Apart from that, Nosqlclient now opens per tab for per execution, which can be closed by right click menus or x button.

Stored Functions (Proficient Level)

There is a special system collection named system.js that can store JavaScript functions for reuse in MongoDB. With Nosqlclient you can manage your functions easily.

Nosqlclient lists all current functions via executing find query on collection system.js, to add functions calls insertMany, to update functions calls updateOne, and to delete them calls delete queries internally.

A basic function seems like: { "_id" : "myAddFunction", "value" : { "code" : "function (x, y){ return x + y; }" } } in your database.

Schema Analyzer (Proficient Level)

Since MongoDB is schemaless, you may want to analyze your collection's schema and see what data types have your fields. Nosqlclient uses variety.js to present you this feature.

It's always good not to use this on huge collections.

Nosqlclient internally brings MongoDB shell (for linux/windows/osx) for this feature, and current version of the schema analyzer binary is v3.4.4 But a new binary can be assignable through settings for the shell and schema analyzer, just in case if you want to use a different version or using a different OS.

Collections - Querying (Novice Level)

Useful Tip

Nosqlclient converts your fields to the corresponding type by following impure and extended json rules explained below. The conversion happens before doing a call to MongoDB. Therefore you don't have to worry about your field types, if you've provided a valid extended json.

Nosqlclient lists your all collections at the left navigation panel for quick navigation, and internally executes listCollections for that.

Whenever you choose a collection from left panel, right section is being re-rendered and allows you to query your selected collection. In most cases, that section is what you're looking for.

Within this section you can:

You can use below queries for the selected collection.

Most of the queries has their own options, for example find has options such as limit, projection, sort etc... Whenever you select a query from the input that's placed at the very top of the page, Nosqlclient renders its options automatically.

As an ease of use, Nosqlclient stores Selector data across your session, so you can switch between collections without losing Selector value.

Extended Json (Novice Level)

As you may know, MongoDB uses BSON data type for its documents, that's why most of the JSON editors are not capable of showing, editing these values. Nosqlclient uses advantage of extended json to show query results or write queries.

Nosqlclient uses strict mode for extended jsons, you can read more by clicking here. But for the most commonly used two types, Nosqlclient lets you to use mongo shell mode, these are ObjectID and ISODate. Therefore you can use various types of queries for those two types.

For example all the following queries are valid for Nosqlclient.

  • {_id:{$oid:"507f191e810c19729de860ea"}}
  • {myDate:{$gte:{$date:"2017-01-01T12:25:05Z"}}}
  • {myDate:{$gte:{$date:"2017-01-01T13:20"}}}
  • {myDate:{$gte:{$date:"2017-01-01"}}}
  • {_id:ObjectId("507f191e810c19729de860ea")}
  • {myDate:{$gte:ISODate("2017-01-01")}}

Impure Json (Novice Level)

JSON is a lightweight data-interchange format, and easy for humans to read and write. But for some reasons, there are restrictions in JSON, for example you have to wrap your object's key with double quotes, and wrap your object with brackets etc.

Nosqlclient lets you to write your queries without thinking of these restrictions. All the following queries are valid for Nosqlclient.

  • {_id: objectID ("507f191e810c19729de860ea")}
  • {myDate:{$gte: isoDaTe ("2017-01-01")}}
  • {myDate:{$gte: new date ("2017-01-01")}}
  • myField: true
  • myStringField: "myStringValue"

Collection Stats (Novice Level)

At the right upper corner of very top of the page, you'll see some statistics. Nosqlclient executes stats query each time you select a collection from the left navigation panel.

Within the result of stats query, Nosqlclient extracts following statistics.

  • Count, comes from count field of the query result, and represents total documents count.
  • Index Count, comes from ncount field of the query result, and represents total collection's index count.
  • Size, comes from size field of the query result, and represents the total collection size. Nosqlclient converts this data to corresponding type of measure by using your selection from settings
  • Total Index Size, comes from totalIndexSize field of the query result, and represents the total index size. Nosqlclient does same measure type conversion here just how it does to show size information.
  • Average Object Size, comes from avgObjSize field of the query result, and represents the average object size. Same measure type conversion happens here as well.
  • Is Capped, comes from capped field of the query result, and represents if the collection is capped or not.

Query Wizard (Novice Level)

If you're a beginner and can't find out how to do various types of queries for find, you can click button that's placed at the right upper corner of query section.

This is a very basic query helper for beginners. After you give a field name to wizard it'll ask you what to do next, and with the following questions you'll have your query at last.

Query Result Export (Novice Level)

For huge queries, that will return thousands of documents, you may want to export your query result without seeing on the browser. Syntax highlighting can be challenging for those queries and it may be a good idea to directly export result to a file instead of seeing result. To do this export, Nosqlclient internally executes find qurey with the selector value and the options you've selected anyway.

Nosqlclient offers JSON and CSV exports for your query results, by pressing button that's placed at the right upper corner of the query section, you'll see a dropdown that lets you to pick between CSV and JSON to export your data. For JSON, Nosqlclient uses extended json

Result View (Novice Level)

Useful Tip

If you're using a small screen and want more space on the right side you can expand it by sliding the middle line that separated left-right sections to the left.

Nosqlclient uses JsonEditor by default to show query result. But you can switch to use AceEditor instead by clicking or changing default result view from settings.

As an ease of use, Nosqlclient opens a new tab for each execution and saves query state for each tab. So that you can switch back to an existing tab and see your old query and never lose it unless you close the tab.

screenshot

If you switch back to an existing tab, you may realize your selector value has been changed if you've used impure json or mongo shell type extended json, that's because the conversion that Nosqlclient does during execution. But no worries, the query is same as you wrote.

Additionally you can close all tabs, or close other tabs by right-clicking on the result tabs headers.

Query History (Novice Level)

Nosqlclient keeps latest 20 queries for each collection and you can execute your latest queries again. To do that you can use button that's placed at the right upper corner of the query section.

Managing Collections

Managing your collections via MongoDB queries can be challenging, Nosqlclient solves this with a context menu. There are two context menus for collections.

You can see these context menus by right-clicking on the Collections text at the left panel or clicking one of the collection names of your database from the same left panel again.

screenshot

The following actions can be done via these context-menus.

  • Manage - Show Collection/View

    Nosqlclient executes listCollections and fetches corresponding collection from this query's result to show you it's details such as validation, storage engine, collation etc...

  • Manage - Convert to Capped

    You can convert your not capped collection to capped with this command, Nosqlclient executes { convertToCapped: collection, size: size } command for this operation.

  • Manage - Rename

    Nosqlclient executes renameCollection for this operation.

  • Manage - Clone

    Nosqlclient executes [{$match: {}}, {$out: cloned_name}] aggregation query for this operation.

  • Manage - Edit Validation Rules

    Nosqlclient executes {"command":[{"collMod":"categories","validator":{},"validationLevel":"","validationAction":""} command for this operation.

  • Manage - Clear Collection

    Nosqlclient executes deleteMany with an empty selector for this operation.

  • Manage - Drop Collection

    Nosqlclient executes drop for this operation.

  • Add Collection/View

    Nosqlclient executes createCollection with the all options you've selected for this operation.

  • Filter Collections

    This is an internal operation Nosqlclient does for you, to filter collection names and show only filtered ones at the left panel. You can either de-select unwanted collection names from the list or write a regex to apply filter.

  • Refresh Collections

    This operation re-connects to database, and executes listCollections internally.

  • Drop All Collections

    Nosqlclient drops your all collections one by one by executing drop query.

Troubleshooting

If you encounter an error, or want to see what's happening behind, you can see logs even if you're using a desktop distribution.

To see logs, you need to the following steps for the corresponding environment.

  • Docker

    docker logs -f <container_name>

  • Windows Distribution

    C:\nosqlclient\Nosqlclient.exe

  • Linux Distribution

    /home/sercan/nosqlclient/Nosqlclient

  • OSX Distribution

    /path/debug/build/Nosqlclient.app/Contents/MacOS/MyProgram