Container class

Operations for reading, replacing, or deleting a specific, existing container by id.

Properties

conflicts

Opertaions for reading and querying conflicts for the given container. For reading or deleting a specific conflict, use .conflict(id).

database
id
items

Operations for creating new items, and reading/querying all items For reading, replacing, or deleting an existing item, use .item(id).

scripts

All operations for Stored Procedures, Triggers, and User Defined Functions

url

Returns a reference URL to the resource. Used for linking in Permissions.

Methods

conflict(string)

Used to read, replace, or delete a specific, existing <xref:Conflict> by id. Use .conflicts for creating new conflicts, or querying/reading all conflicts.

delete(RequestOptions)

Delete the container

getQueryPlan(string | SqlQuerySpec)
item(string, any)

Used to read, replace, or delete a specific, existing <xref:Item> by id. Use .items for creating new items, or querying/reading all items.

read(RequestOptions)

Read the container's definition

readPartitionKeyRanges(FeedOptions)
replace(ContainerDefinition, RequestOptions)

Replace the container's definition

Property Details

conflicts

Opertaions for reading and querying conflicts for the given container. For reading or deleting a specific conflict, use .conflict(id).

conflicts: Conflicts

Property Value

database

database: Database

Property Value

id

id: string

Property Value

string

items

Operations for creating new items, and reading/querying all items For reading, replacing, or deleting an existing item, use .item(id).

items: Items

Property Value

scripts

All operations for Stored Procedures, Triggers, and User Defined Functions

scripts: Scripts

Property Value

url

Returns a reference URL to the resource. Used for linking in Permissions.

url: string

Property Value

string

Method Details

conflict(string)

Used to read, replace, or delete a specific, existing <xref:Conflict> by id. Use .conflicts for creating new conflicts, or querying/reading all conflicts.

function conflict(id: string)

Parameters

id
string

The id of the <xref:Conflict>.

Returns

delete(RequestOptions)

Delete the container

function delete(options?: RequestOptions)

Parameters

options
RequestOptions

Returns

getQueryPlan(string | SqlQuerySpec)

function getQueryPlan(query: string | SqlQuerySpec)

Parameters

query
string | SqlQuerySpec

Returns

Promise<Response<PartitionedQueryExecutionInfo>>

item(string, any)

Used to read, replace, or delete a specific, existing <xref:Item> by id. Use .items for creating new items, or querying/reading all items.

function item(id: string, partitionKey: any)

Parameters

id
string

The id of the <xref:Item>.

partitionKey
any

The partition key of the <xref:Item>

Returns

read(RequestOptions)

Read the container's definition

function read(options?: RequestOptions)

Parameters

options
RequestOptions

Returns

readPartitionKeyRanges(FeedOptions)

function readPartitionKeyRanges(feedOptions?: FeedOptions)

Parameters

feedOptions
FeedOptions

Returns

QueryIterator<PartitionKeyRange>

replace(ContainerDefinition, RequestOptions)

Replace the container's definition

function replace(body: ContainerDefinition, options?: RequestOptions)

Parameters

options
RequestOptions

Returns