Following commands in action logic editor help you work with MongoDB, automate querying and verification against the database. All CRUD operations are supported.
Establishing Connection
Connect to MongoDB server
Establishes a MongoDB session by connecting with given credentials. This command must be used before performing any other MongoDB related steps in the action. This statement also sets the Current Session, so subsequent commands executed on MongoDB will run against this connection.
Session Name |
Unique name for the session to refer to this connection in the current action logic. |
Switch to MongoDB Session
Switches to given MongoDB Session, when you are working with multiple MongoDB sessions simultaneously. Make sure that session is already established with a Connection command before executing this.
Session Name |
Name of the session to switch to. Any subsequent MongoDB commands will run against this session. |
Querying Data
Get field count for document index in MongoDB Collection
Returns the number of fields for given document index in MongoDB Collection. Make sure that a session is already established.
Collection Name |
Name of the collection in the MongoDB |
Get field value for field at document index in MongoDB Collection
Returns value of given document index in MongoDB Collection. Make sure that a session is already established.
Collection Name |
Name of the collection in the MongoDB |
Get document at index from MongoDB Collection
Returns document at a given index in a MongoDB Collection. Make sure that a session is already established.
Collection Name |
Name of the collection in the MongoDB |
Get documents matching filter in MongoDB Collection
Returns Filtered documents for a given filter criteria in MongoDB Collection. Make sure that a session is already established.
Collection Name |
Name of the collection in the MongoDB |
Get documents count in MongoDB Collection
Returns the number of documents in a given MongoDB Collection. Make sure that a session is already established.
Collection Name |
Name of the collection in the MongoDB |
Get field names for document index in MongoDB Collection
Returns names of fields for given document index of MongoDB Collection. Make sure that a session is already established.
Collection Name |
Name of the collection in the MongoDB |
Get document count matching filter in MongoDB Collection
Returns count of filtered documents for a given filter criteria in MongoDB Collection. Make sure that a session is already established.
Collection Name |
Name of the collection in the MongoDB |
Verifying Results
Verify MongoDB Collection document field value Is
Verifies given field has given value for document at given index in MongoDB Collection. Make sure that a session is already established.
Collection Name |
Name of the collection in the MongoDB |
Verify document count matching filter in MongoDB Collection
Verifies count of filtered documents for a given filter criteria in MongoDB Collection. Make sure that a session is already established.
Collection Name |
Name of the collection in the MongoDB |
Verify MongoDB Collection document field value Is Not
Verifies given field for document index in MongoDB Collection. Make sure that a session is already established.
Collection Name |
Name of the collection in the MongoDB |
Updating Data
Add new document to MongoDB Collection
Inserts JSON document to given Collection. Make sure that a session is already established
Collection Name |
Name of the collection in the MongoDB |
Update documents in MongoDB Collection
Updates filtered documents with updated values as JSON in given Collection. Make sure that a session is already established.
Collection Name |
Name of the collection in the MongoDB |
Delete documents In MongoDB Collection
Delete Filtered documents in Collection. Make sure that a session is already established.
Collection Name |
Name of the collection in the MongoDB |
Comments
1 comment
Providing few examples scenarios on using AccelQ with MongoDB would have been more helpful
Please sign in to leave a comment.