CosmosDbContainers class

Class used to manage CosmosDbContainers in a CosmosDbDatabase.

Constructors

CosmosDbContainers(CosmosDbDatabase database)

Properties

database CosmosDbDatabase
The CosmosDbDatabase this container belongs to.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String
The container's url.
final

Methods

create(String name, {required PartitionKeySpec partitionKey, IndexingPolicy? indexingPolicy, GeospatialConfig? geospatialConfig, CosmosDbPermission? permission, CosmosDbThroughput? throughput}) Future<CosmosDbContainer>
Creates a new CosmosDbContainer with the specified name and partitionKeys.
delete(CosmosDbContainer container, {bool throwOnNotFound = false, CosmosDbPermission? permission}) Future<bool>
Deletes the specified container from this database. All documents in this container will be lost. If the container does not exists, this method returns true by default. if throwOnNotFound is set to true, it will throw a NotFoundException instead. Upon success, the CosmosDbContainer.exists flag will be set to false.
fromJson(Map json) CosmosDbContainer
Deserialize data from JSON object json into a new CosmosDbContainer instance. Handles fields id, partitionKey, indexingPolicy.
list({CosmosDbPermission? permission}) Future<Iterable<CosmosDbContainer>>
Lists all containers from this database.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open(String name) Future<CosmosDbContainer>
Opens an existing CosmosDbContainer with id name.
openOrCreate(String name, {PartitionKeySpec? partitionKey, IndexingPolicy? indexingPolicy, GeospatialConfig? geospatialConfig, CosmosDbThroughput? throughput}) Future<CosmosDbContainer>
Opens or creates a CosmosDbContainer with id name.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited