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(RequestOptions)

Delete the given StoredProcedure.

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.

read(RequestOptions)

Read the StoredProcedureDefinition for the given StoredProcedure.

replace(StoredProcedureDefinition, RequestOptions)

Replace the given StoredProcedure with the specified StoredProcedureDefinition.

Property Details

container

container: Container

Property Value

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

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

replace(StoredProcedureDefinition, RequestOptions)

Replace the given StoredProcedure with the specified StoredProcedureDefinition.

function replace(body: StoredProcedureDefinition, options?: RequestOptions): Promise<StoredProcedureResponse>

Parameters

body
StoredProcedureDefinition

The specified StoredProcedureDefinition to replace the existing definition.

options
RequestOptions

Returns