PartitionKeySpec class

Class representing a partition key definition in a Cosmos DB container.

Constructors

PartitionKeySpec(String partitionKey)
Partition key with a single property.
factory
PartitionKeySpec.hierarchical(List<String> partitionKeys)
Creates a partition for multiple keys.
factory
PartitionKeySpec.range(String partitionKey)
Partition key range with a single property.
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
kind String
The partition key kind.
final
paths List<String>
The partition key paths.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
version int?
The partition key version.
final

Methods

from(BaseDocument document) PartitionKey?
Extracts the document's partition key according to this specification.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → dynamic
Serializes this instance to a JSON object.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

id PartitionKeySpec
Default partition key.
final

Static Methods

fromJson(dynamic json) PartitionKeySpec
Deserializes data from JSON object json into a new PartitionKeySpec instance. Handles fields paths, kind, version.