Connect and Manage DB
This feature allows you to interact with databases related to extensions by running queries. You can run either a Read
or a Write
query based on your requirement.
Running Queries
-
Navigate to DB Management > Mongo DB Workbench in the Dev Console.
-
From the Select Database drop-down, select the database you want to interact with.
-
From the Select Collection drop-down, select the collection.
The Response section displays the collection's schema, showing the available fields.
Note: You can click Load schema to manually load the schema for the collection. -
In the Write Query text box, enter your query.
You can either enter a write or a read query. Write queries are used to enter the data, such as insertion or update of data, and the read queries are used to retrieve data. -
Click Run Query.
The results of theread
query will be displayed in the console. Queries involving insert, update, replace, delete, and write require approval, and the results are displayed after approval.
Note: You can explicitly add a limit clause to your query for the number of results, or the system might enforce a default limit if the number of results is more.
Viewing Query History
You can view the query history from the DB Audit log section.
To view, navigate to Dev Console> DB Management>DB Audit Log. Click on the ID to view the query detail. The query detail page displays the following information:
Field Name | Description |
---|---|
Database | Database name |
Collection | Collection name |
Query | Query entered |
Created by | Name of the user who ran the query |
Status | Status of the query |
Records fetched | Number of records fetched |
Execution time | Time taken to execute the query |

Approval Process for Write Queries
- DB Audit log> Approve
Updated 1 day ago