Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Container

Package version

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

see

Containers for creating new containers, and reading/querying all containers; use .containers.

Note: all these operations make calls against a fixed budget. You should design your system such that these calls scale sublinearly with your application. For instance, do not call container(id).read() before every single item.read() call, to ensure the container exists; do this once on application start up.

Hierarchy

  • Container

Index

Properties

database

database: Database

The parent Database.

id

id: string

The id of the given container.

Accessors

conflicts

items

scripts

url

  • get url(): string

Methods

conflict

delete

getPartitionKeyDefinition

getQueryPlan

  • getQueryPlan(query: string | SqlQuerySpec): Promise<Response<PartitionedQueryExecutionInfo>>

item

  • item(id: string, partitionKeyValue?: any): Item
  • Used to read, replace, or delete a specific, existing Item by id.

    Use .items for creating new items, or querying/reading all items.

    example

    Replace an item const {body: replacedItem} = await container.item("", "").replace({id: "", title: "Updated post", authorID: 5});

    Parameters

    • id: string

      The id of the Item.

    • Optional partitionKeyValue: any

      The value of the Item partition key

    Returns Item

read

readOffer

readPartitionKeyRanges

replace

Generated using TypeDoc