StoredProcedure class
Operations for reading, replacing, deleting, or executing a specific, existing stored procedure by id.
For operations to create, read all, or query Stored Procedures,
Properties
container | |
id | |
url | Returns a reference URL to the resource. Used for linking in Permissions. |
Methods
delete(Request |
Delete the given StoredProcedure. |
execute<T>(Partition |
Execute the given StoredProcedure. The specified type, T, is not enforced by the client. Be sure to validate the response from the stored procedure matches the type, T, you provide. |
read(Request |
Read the StoredProcedureDefinition for the given StoredProcedure. |
replace(Stored |
Replace the given StoredProcedure with the specified StoredProcedureDefinition. |
Property Details
container
id
id: string
Property Value
string
url
Returns a reference URL to the resource. Used for linking in Permissions.
string url
Property Value
string
Method Details
delete(RequestOptions)
Delete the given StoredProcedure.
function delete(options?: RequestOptions): Promise<StoredProcedureResponse>
Parameters
- options
- RequestOptions
Returns
Promise<StoredProcedureResponse>
execute<T>(PartitionKey, any[], RequestOptions)
Execute the given StoredProcedure.
The specified type, T, is not enforced by the client. Be sure to validate the response from the stored procedure matches the type, T, you provide.
function execute<T>(partitionKey: PartitionKey, params?: any[], options?: RequestOptions): Promise<ResourceResponse<T>>
Parameters
- partitionKey
- PartitionKey
The partition key to use when executing the stored procedure
- params
-
any[]
Array of parameters to pass as arguments to the given StoredProcedure.
- options
- RequestOptions
Additional options, such as the partition key to invoke the StoredProcedure on.
Returns
Promise<ResourceResponse<T>>
read(RequestOptions)
Read the StoredProcedureDefinition for the given StoredProcedure.
function read(options?: RequestOptions): Promise<StoredProcedureResponse>
Parameters
- options
- RequestOptions
Returns
Promise<StoredProcedureResponse>
replace(StoredProcedureDefinition, RequestOptions)
Replace the given StoredProcedure with the specified StoredProcedureDefinition.
function replace(body: StoredProcedureDefinition, options?: RequestOptions): Promise<StoredProcedureResponse>
Parameters
The specified StoredProcedureDefinition to replace the existing definition.
- options
- RequestOptions
Returns
Promise<StoredProcedureResponse>