Type alias CollectionPropertiesOptions

CollectionPropertiesOptions: {
    cacheEnabled?: boolean;
    computedValues?: ComputedValueOptions[];
    replicationFactor?: number | "satellite";
    schema?: SchemaOptions;
    waitForSync?: boolean;
    writeConcern?: number;
}

Options for setting a collection's properties.

See properties and properties.

Type declaration

  • Optional cacheEnabled?: boolean

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

    Default: false

  • Optional computedValues?: ComputedValueOptions[]

    Computed values to apply to documents in this collection.

  • Optional replicationFactor?: number | "satellite"

    (Cluster only.) How many copies of each document should be kept in the cluster.

    Default: 1

  • Optional schema?: SchemaOptions

    Options for validating documents in this collection.

  • Optional waitForSync?: boolean

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

  • Optional writeConcern?: number

    (Cluster only.) Write concern for this collection.

Generated using TypeDoc