tcb db nosql execute
Run database native commands through the RunCommands API.
Usage
tcb db nosql execute --command '<json>' [options]
Parameters
| Parameter | Required | Description | Default |
|---|---|---|---|
-c, --command <json> | Yes | MgoCommands JSON | — |
--tag <tag> | No | Instance tag, used to tell instances apart when an environment has several | — |
--instanceId <id> | No | MongoConnector instance ID | — |
--databaseName <name> | No | MongoConnector database name | — |
-e, --env-id <envId> | Yes | Environment ID | — |
API reference: RunCommands · MgoCommandParam
Examples
# Query the first 5 documents in the users collection
tcb db nosql execute \
--command '{"find": "users", "limit": 5}' \
-e my-env-id
# Run against a specific instance
tcb db nosql execute \
--command '{"count": "orders", "query": {"status": "paid"}}' \
--instanceId inst-xxx \
-e my-env-id