Gets the ID of the Cosmos DB container.
Gets a JSON schema representing the configured Cosmos schema.
Adds a path to the index.
path to add to the index
list of indexes to apply
Enables the TTL without setting a default TTL, equivalent to .ttl(-1)
.
But I have to look that up literally every time, so this is more friendly.
Adds a new field to the schema.
the name of the field
optional configuration for the field
the modified schema
Adds a new field to the schema.
the name of the field
optional configuration for the field
the modified schema
Adds a new field to the schema.
the name of the field
optional configuration for the field
the modified schema
Sets the given path as forming the partition key.
Although the API accepts an array, it is currently documented that it must contain a single value.
Removes all paths from indexing, unless explicitly included. This reduces write charges and would be a sensible behavior for most use cases. Note that unless this is called, all fields are indexed.
Removes the field from being indexed.
Sets the conflict resolution policy for the container.
Updates the geospatial config for the container.
Sets the (per-container) throughput, either in RU/s or an auto-scale configuration.
Updates the default TTL in seconds for the container.
Adds the given paths as being unique for the container. Note that unique keys are per-partition key.
Generated using TypeDoc
The Schema describes a collection in Cosmos DB. It's a fluent-style builder where you define all the fields, which are passed into the Model. For a fully-type TypeScript consumer, you could provide: