Triggers class
Operations to create, upsert, query, and read all triggers.
Use container.triggers
to read, replace, or delete a Trigger.
Properties
container |
Methods
create(Trigger |
Create a trigger. Azure Cosmos DB supports pre and post triggers defined in JavaScript to be executed on creates, updates and deletes. For additional details, refer to the server-side JavaScript API documentation. |
query(Sql |
Query all Triggers. |
query<T>(Sql |
Query all Triggers. |
read |
Read all Triggers. Example Read all trigger to array.
|
Property Details
container
Method Details
create(TriggerDefinition, RequestOptions)
Create a trigger.
Azure Cosmos DB supports pre and post triggers defined in JavaScript to be executed on creates, updates and deletes.
For additional details, refer to the server-side JavaScript API documentation.
function create(body: TriggerDefinition, options?: RequestOptions): Promise<TriggerResponse>
Parameters
- body
- TriggerDefinition
- options
- RequestOptions
Returns
Promise<TriggerResponse>
query(SqlQuerySpec, FeedOptions)
Query all Triggers.
function query(query: SqlQuerySpec, options?: FeedOptions): QueryIterator<any>
Parameters
- query
- SqlQuerySpec
Query configuration for the operation. See SqlQuerySpec for more info on how to configure a query.
- options
- FeedOptions
Returns
QueryIterator<any>
query<T>(SqlQuerySpec, FeedOptions)
Query all Triggers.
function query<T>(query: SqlQuerySpec, options?: FeedOptions): QueryIterator<T>
Parameters
- query
- SqlQuerySpec
Query configuration for the operation. See SqlQuerySpec for more info on how to configure a query.
- options
- FeedOptions
Returns
readAll(FeedOptions)
Read all Triggers.
Example
Read all trigger to array.
const {body: triggerList} = await container.triggers.readAll().fetchAll();
function readAll(options?: FeedOptions): QueryIterator<TriggerDefinition & Resource>
Parameters
- options
- FeedOptions