The parent container.
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.
Represents the body of the item. Can contain any number of user defined properties.
Used for modifying the request (for instance, specifying the partition key).
Queries all items.
Read all items to array.
const querySpec: SqlQuerySpec = {
query: "SELECT * FROM Families f WHERE f.lastName = @lastName",
parameters: [
{name: "@lastName", value: "Hendricks"}
]
};
const {result: items} = await items.query(querySpec).toArray();
Query configuration for the operation. See SqlQuerySpec for more info on how to configure a query.
Used for modifying the request (for instance, specifying the partition key).
Queries all items.
Read all items to array.
const querySpec: SqlQuerySpec = {
query: "SELECT firstname FROM Families f WHERE f.lastName = @lastName",
parameters: [
{name: "@lastName", value: "Hendricks"}
]
};
const {result: items} = await items.query<{firstName: string}>(querySpec).toArray();
Query configuration for the operation. See SqlQuerySpec for more info on how to configure a query.
Used for modifying the request (for instance, specifying the partition key).
Read all items.
There is no set schema for JSON items. They may contain any number of custom properties.
Read all items to array.
const {body: containerList} = await items.readAll().toArray();
Used for modifying the request (for instance, specifying the partition key).
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.
Read all items to array.
const {body: containerList} = await items.readAll().toArray();
Used for modifying the request (for instance, specifying the partition key).
Create a ChangeFeedIterator
to iterate over pages of changes
Read from the beginning of the change feed.
const iterator = items.readChangeFeed({ startFromBeginning: true });
const firstPage = await iterator.executeNext();
const firstPageResults = firstPage.result
const secondPage = await iterator.executeNext();
Create a ChangeFeedIterator
to iterate over pages of changes
Create a ChangeFeedIterator
to iterate over pages of changes
Create a ChangeFeedIterator
to iterate over pages of changes
Upsert an item.
There is no set schema for JSON items. They may contain any number of custom properties.
Represents the body of the item. Can contain any number of user defined properties.
Used for modifying the request (for instance, specifying the partition key).
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.
Represents the body of the item. Can contain any number of user defined properties.
Used for modifying the request (for instance, specifying the partition key).
Generated using TypeDoc
Operations for creating new items, and reading/querying all items
Item for reading, replacing, or deleting an existing container; use
.item(id)
.