Items class

Operations for creating new items, and reading/querying all items

Properties

container

Methods

create(any, RequestOptions)

Create a item. There is no set schema for JSON items. They may contain any number of custom properties..

create(T, RequestOptions)

Create a item. Any provided type, T, is not necessarily enforced by the SDK. You may get more or less properties and it's up to your logic to enforce it.

There is no set schema for JSON items. They may contain any number of custom properties.

query(string | SqlQuerySpec, FeedOptions)

Queries all items.

query(string | SqlQuerySpec, FeedOptions)

Queries all items.

readAll(FeedOptions)

Read all items. There is no set schema for JSON items. They may contain any number of custom properties.

readAll(FeedOptions)

Read all items. Any provided type, T, is not necessarily enforced by the SDK. You may get more or less properties and it's up to your logic to enforce it.

There is no set schema for JSON items. They may contain any number of custom properties.

readChangeFeed(ChangeFeedOptions)

Create a ChangeFeedIterator to iterate over pages of changes

readChangeFeed(ChangeFeedOptions)

Create a ChangeFeedIterator to iterate over pages of changes

readChangeFeed(string | number | boolean, ChangeFeedOptions)

Create a ChangeFeedIterator to iterate over pages of changes

readChangeFeed(string | number | boolean, ChangeFeedOptions)

Create a ChangeFeedIterator to iterate over pages of changes

upsert(any, RequestOptions)

Upsert an item. There is no set schema for JSON items. They may contain any number of custom properties.

upsert(T, RequestOptions)

Upsert an item. Any provided type, T, is not necessarily enforced by the SDK. You may get more or less properties and it's up to your logic to enforce it.

There is no set schema for JSON items. They may contain any number of custom properties.

Property Details

container

container: Container

Property Value

Method Details

create(any, RequestOptions)

Create a item. There is no set schema for JSON items. They may contain any number of custom properties..

function create(body: any, options?: RequestOptions)

Parameters

body
any

Represents the body of the item. Can contain any number of user defined properties.

options
RequestOptions

Used for modifying the request (for instance, specifying the partition key).

Returns

create(T, RequestOptions)

Create a item. Any provided type, T, is not necessarily enforced by the SDK. You may get more or less properties and it's up to your logic to enforce it.

There is no set schema for JSON items. They may contain any number of custom properties.

function create<T>(body: T, options?: RequestOptions)

Parameters

body
T

Represents the body of the item. Can contain any number of user defined properties.

options
RequestOptions

Used for modifying the request (for instance, specifying the partition key).

Returns

Promise<ItemResponse<T>>

query(string | SqlQuerySpec, FeedOptions)

Queries all items.

function query(query: string | SqlQuerySpec, options?: FeedOptions)

Parameters

query
string | SqlQuerySpec

Query configuration for the operation. See <xref:SqlQuerySpec> for more info on how to configure a query.

options
FeedOptions

Used for modifying the request (for instance, specifying the partition key).

Returns

query(string | SqlQuerySpec, FeedOptions)

Queries all items.

function query<T>(query: string | SqlQuerySpec, options?: FeedOptions)

Parameters

query
string | SqlQuerySpec

Query configuration for the operation. See <xref:SqlQuerySpec> for more info on how to configure a query.

options
FeedOptions

Used for modifying the request (for instance, specifying the partition key).

Returns

readAll(FeedOptions)

Read all items. There is no set schema for JSON items. They may contain any number of custom properties.

function readAll(options?: FeedOptions)

Parameters

options
FeedOptions

Used for modifying the request (for instance, specifying the partition key).

Returns

readAll(FeedOptions)

Read all items. Any provided type, T, is not necessarily enforced by the SDK. You may get more or less properties and it's up to your logic to enforce it.

There is no set schema for JSON items. They may contain any number of custom properties.

function readAll<T>(options?: FeedOptions)

Parameters

options
FeedOptions

Used for modifying the request (for instance, specifying the partition key).

Returns

readChangeFeed(ChangeFeedOptions)

Create a ChangeFeedIterator to iterate over pages of changes

function readChangeFeed(changeFeedOptions?: ChangeFeedOptions)

Parameters

changeFeedOptions
ChangeFeedOptions

Returns

readChangeFeed(ChangeFeedOptions)

Create a ChangeFeedIterator to iterate over pages of changes

function readChangeFeed<T>(changeFeedOptions?: ChangeFeedOptions)

Parameters

changeFeedOptions
ChangeFeedOptions

Returns

readChangeFeed(string | number | boolean, ChangeFeedOptions)

Create a ChangeFeedIterator to iterate over pages of changes

function readChangeFeed(partitionKey: string | number | boolean, changeFeedOptions: ChangeFeedOptions)

Parameters

partitionKey
string | number | boolean
changeFeedOptions
ChangeFeedOptions

Returns

readChangeFeed(string | number | boolean, ChangeFeedOptions)

Create a ChangeFeedIterator to iterate over pages of changes

function readChangeFeed<T>(partitionKey: string | number | boolean, changeFeedOptions: ChangeFeedOptions)

Parameters

partitionKey
string | number | boolean
changeFeedOptions
ChangeFeedOptions

Returns

upsert(any, RequestOptions)

Upsert an item. There is no set schema for JSON items. They may contain any number of custom properties.

function upsert(body: any, options?: RequestOptions)

Parameters

body
any

Represents the body of the item. Can contain any number of user defined properties.

options
RequestOptions

Used for modifying the request (for instance, specifying the partition key).

Returns

upsert(T, RequestOptions)

Upsert an item. Any provided type, T, is not necessarily enforced by the SDK. You may get more or less properties and it's up to your logic to enforce it.

There is no set schema for JSON items. They may contain any number of custom properties.

function upsert<T>(body: T, options?: RequestOptions)

Parameters

body
T

Represents the body of the item. Can contain any number of user defined properties.

options
RequestOptions

Used for modifying the request (for instance, specifying the partition key).

Returns

Promise<ItemResponse<T>>