Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Container

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

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

    For reading, replacing, or deleting an existing item, use .item(id).

    example

    Create a new item

    const {body: createdItem} = await container.items.create({id: "<item id>", properties: {}});

    Returns Items

scripts

url

  • get url(): string

Methods

conflict

delete

getQueryPlan

item

  • item(id: string, partitionKey: 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.

    • partitionKey: any

      The partition key of the Item

    Returns Item

read

readPartitionKeyRanges

replace

Generated using TypeDoc