Type alias CollectionProperties

CollectionProperties: { computedValues: ComputedValueProperties[]; distributeShardsLike?: string; keyOptions: CollectionKeyProperties; numberOfShards?: number; replicationFactor?: number; schema: SchemaProperties | null; shardKeys?: string[]; shardingStrategy?: ShardingStrategy; smartJoinAttribute?: string; statusString: string; waitForSync: boolean; writeConcern: number }

An object defining the properties of a collection.

Type declaration

  • computedValues: ComputedValueProperties[]

    Computed values applied to documents in this collection.

  • Optional distributeShardsLike?: string

    (Enterprise Edition cluster only.) If set to a collection name, sharding of the new collection will follow the rules for that collection. As long as the new collection exists, the indicated collection can not be dropped.

  • keyOptions: CollectionKeyProperties

    An object defining the collection's key generation.

  • Optional numberOfShards?: number

    (Cluster only.) Number of shards of this collection.

  • Optional replicationFactor?: number

    (Cluster only.) Replication factor of the collection.

  • schema: SchemaProperties | null

    Properties for validating documents in the collection.

  • Optional shardKeys?: string[]

    (Cluster only.) Keys of this collection that will be used for sharding.

  • Optional shardingStrategy?: ShardingStrategy

    (Cluster only.) Sharding strategy of the collection.

  • Optional smartJoinAttribute?: string

    (Enterprise Edition cluster only.) Attribute containing the shard key value of the referred-to smart join collection.

  • statusString: string

    A human-readable representation of the collection loading status.

  • waitForSync: boolean

    Whether data should be synchronized to disk before returning from a document create, update, replace or removal operation.

  • writeConcern: number

    (Cluster only.) Write concern for this collection.

Generated using TypeDoc