CosmosDbPartitionedStorage class
Implements storage using Cosmos DB partitioned storage.
Constructors
| Cosmos |
Initializes a new instance of the CosmosDbPartitionedStorage class. |
Properties
| length | The number of items in the storage. This property is not currently used. |
Methods
| delete(string[]) | Deletes items from storage. |
| initialize() | Initializes the Cosmos DB container. |
| read(string[]) | Reads items from storage. |
| write(Store |
Writes items to storage. |
Constructor Details
CosmosDbPartitionedStorage(CosmosDbPartitionedStorageOptions)
Initializes a new instance of the CosmosDbPartitionedStorage class.
new CosmosDbPartitionedStorage(cosmosDbStorageOptions: CosmosDbPartitionedStorageOptions)
Parameters
- cosmosDbStorageOptions
- CosmosDbPartitionedStorageOptions
The options for configuring Cosmos DB partitioned storage.
Property Details
length
The number of items in the storage. This property is not currently used.
length: number
Property Value
number
Method Details
delete(string[])
Deletes items from storage.
function delete(keys: string[]): Promise<void>
Parameters
- keys
-
string[]
The keys of the items to delete.
Returns
Promise<void>
initialize()
Initializes the Cosmos DB container.
function initialize(): Promise<void>
Returns
Promise<void>
read(string[])
Reads items from storage.
function read(keys: string[]): Promise<StoreItems>
Parameters
- keys
-
string[]
The keys of the items to read.
Returns
Promise<StoreItems>
A promise that resolves to the read items.
write(StoreItems)
Writes items to storage.
function write(changes: StoreItems): Promise<void>
Parameters
- changes
- StoreItems
The items to write.
Returns
Promise<void>