Connect & Query

NoSQL Databases

NoSQL mode holds your MongoDB and Redis connections. Use it to browse collections, find and edit documents, run aggregation pipelines, and inspect Redis keys. Relational databases are in SQL Databases.

Connections are listed under GROUPS, the same groups you see in Workspace.

Add a connection

  1. Open NoSQL from the left rail.
  2. Click New Connection.
  3. Enter a Connection name and choose the Group to file it under.
  4. Pick the Driver: MongoDB or Redis.
  5. Choose the Input mode:
    • Connection string: paste a URL such as mongodb://localhost:27017 or redis://localhost:6379.
    • Host / port: enter Host, Port, Database (optional), Username and Password. The default port is 27017 for MongoDB and 6379 for Redis.
  6. Save the connection.

The Advanced tab has three switches:

Switch What it does
Use SSL / TLS Encrypts traffic between Clauge and the database
Direct connection MongoDB only
Connect via SSH tunnel Routes the connection through a bastion host, using an SSH profile saved in SSH

Click a connection in the sidebar to connect. Right-click it for Connect or Disconnect, Refresh, Edit, Copy Connection String and Delete.

MongoDB

After you connect, the sidebar lists the databases and their collections. Click a collection to open it in a tab.

A MongoDB collection open in the document viewer.

A collection tab has three views:

View Use it to
Documents Page through documents, filter them, and add, edit or delete them
Query Write a find query and run it
Aggregation Write an aggregation pipeline, for example [{"$match": {}}], and run it

Find documents

  1. Open the Documents view.
  2. Type a filter such as {"field": "value"}.
  3. Click Options to add a Sort.
  4. Click Find. Reset clears the filter.

The view shows 25 documents per page. Change it with Per page. Search in documents... highlights text in the documents on the current page.

Add, edit and delete documents

  • Add Data → Insert Document: paste one or more documents, then click Insert.
  • Add Data → Import JSON or CSV File: load documents from a file.
  • Each document has Copy, Edit and Delete buttons. In the editor, Format tidies the JSON and Update saves it. The _id field cannot be changed.

Manage collections

Right-click in the sidebar:

  • On a database: Create Collection, Drop Database.
  • On a collection: Open in New Tab, Rename Collection, Drop Collection.

Redis

A Redis connection opens with two views: Keys and Console.

Redis keys with a selected value.

Keys

  1. Type a Pattern, for example user:*.
  2. Click Scan.
  3. Select a key to view its value.

From here you can copy the value or delete the key. + Set Key creates a key from a Key, a Value and a TTL (seconds). Use -1 for no expiry.

Console

Type a Redis command, such as PING, INFO server or GET key, and click Send. The Up and Down arrows step through earlier commands.

AI Assistant

Press Cmd/Ctrl+L to open the AI Assistant. It can write a query for the connected database and run it. It asks before running each query unless you turn on auto-run in the panel header.

The assistant uses the AI provider your organization set up. Its status is shown under Settings → AI.

Settings

Settings → NoSQL has the Connection & Query card with the defaults for NoSQL connections:

  • Server Selection Timeout (ms)
  • Connect Timeout (ms)
  • Default Find Limit
  • Max Find Limit

Timeouts apply to new connections. The find limits apply to the document viewer and to queries the AI Assistant runs.

Organization connections

  • A connection with the Org badge is provided by your organization. You can connect and query, but you cannot edit or delete it.
  • You can file your own connection in an organization group only if your organization allows it. If it does not, the group is greyed out in the Group list with "Turned off by your organization".
  • If your organization turns NoSQL off for a group, that group's connections are read-only and show "NoSQL is turned off for this group by your organization". If NoSQL is off for all your groups, it is not on the rail.

See Resources & Access for how organization connections reach you.

What’s next