Type alias CollectionProperties

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

An object defining the properties of a collection.

Type declaration

  • cacheEnabled: boolean

    Whether the in-memory hash cache is enabled for this collection.

  • 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.

  • Optional isDisjoint?: string

    (Enterprise Edition only.) Whether the SmartGraph this collection belongs to is disjoint.

  • Optional isSmart?: boolean

    (Enterprise Edition only.) Whether the collection is used in a SmartGraph or EnterpriseGraph.

  • keyOptions: CollectionKeyProperties

    An object defining the collection's key generation.

  • Optional numberOfShards?: number

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

  • Optional replicationFactor?: number | "satellite"

    (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 smartGraphAttribute?: string

    (Enterprise Edition cluster only.) Attribute used for sharding.

  • 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.

  • syncByRevision: boolean

    Whether the newer revision-based replication protocol is enabled for this collection.

  • 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