Following commands in action logic editor help you work with Couchbase DB, automate querying and verification against the database. All CRUD operations are supported.
Establishing Connection
Connect to Couchbase DB server
Establishes a Couchbase DB session by connecting with given credentials. This command must be used before performing any other Couchbase DB related steps in the action. This statement also sets the Current Session, so subsequent commands executed on Couchbase DB will run against this connection.
Note that the session is accessible only within the Action where you execute this command.
Session name |
Unique name for the session to refer to this connection in the current action logic |
Session Management
Switch to Couchbase DB Session
Switches to given Couchbase database session, when you are working with multiple database connections simultaneously. Make sure the session is already established with a connection command.
session reference name |
Name of the session to switch to. Any subsequent Couchbase DB commands will run against this session. |
Close current Couchbase DB session
Closes the current Couchbase database session. After closing a session, either create another session or switch to one of the already existing sessions before working with the DB again.
Querying Data
Get document in Couchbase bucket
Gets document in current Couchbase DB session bucket with given document id. Make sure that a session is already established.
Document id |
Document id in bucket whose value should be retrieved |
Get document field value in Couchbase bucket
Gets field value of a document in current Couchbase DB session. Make sure that a session is already established.
Document id |
Document id in bucket |
Execute Couchbase DB Query
Executes a query on current Couchbase DB session.
Query |
Query to be executed on Couchbase DB |
Updating Data
Insert document in Couchbase bucket
Inserts document in current Couchbase DB session bucket with given document id. Document must be in JSON format. Make sure that a session is already established.
New document id |
New document id for the document to insert, make sure this is unique in Couchbase bucket |
Update document in Couchbase bucket
Updates document in current Couchbase DB session bucket by given document id. Document must be in JSON format. Make sure that a session is already established.
Document id |
Document id in bucket, make sure document id already exists in Couchbase bucket |
Upsert document in Couchbase bucket
Document id |
Document id in bucket |
Delete document in Couchbase bucket
Document id |
Document id, make sure it exists in Couchbase bucket |
Verifying Results
Verify document field value in Couchbase bucket Is
Verifies document filed value of given field name in current Couchbase DB session bucket by document id. Make sure that a session is already established.
Document id |
Document id in bucket |
Verify document field value in Couchbase bucket Is NOT
Verifies document filed value of given field name in current Couchbase DB session is NOT a given value. Make sure that a session is already established.
Document id |
Document id in bucket |
Comments
0 comments
Please sign in to leave a comment.