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 specifiedname
andpartitionKeys
. -
delete(
CosmosDbContainer container, {bool throwOnNotFound = false, CosmosDbPermission? permission}) → Future< bool> -
Deletes the specified
container
from this database. All documents in thiscontainer
will be lost. If thecontainer
does not exists, this method returnstrue
by default. ifthrowOnNotFound
is set totrue
, it will throw a NotFoundException instead. Upon success, the CosmosDbContainer.exists flag will be set tofalse
. -
fromJson(
Map json) → CosmosDbContainer -
Deserialize data from JSON object
json
into a new CosmosDbContainer instance. Handles fieldsid
,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 idname
. -
openOrCreate(
String name, {PartitionKeySpec? partitionKey, IndexingPolicy? indexingPolicy, GeospatialConfig? geospatialConfig, CosmosDbThroughput? throughput}) → Future< CosmosDbContainer> -
Opens or creates a
CosmosDbContainer
with idname
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited