API 参考
    正在准备搜索索引...

    接口 UpdateOneModel<TSchema>

    interface UpdateOneModel<TSchema extends Document = Document> {
        arrayFilters?: Document[];
        collation?: CollationOptions;
        filter: Filter<TSchema>;
        hint?: Hint;
        update: UpdateFilter<TSchema> | UpdateFilter<TSchema>[];
        upsert?: boolean;
    }

    类型参数

    索引

    属性

    arrayFilters?: Document[]

    A set of filters specifying to which array elements an update should apply.

    collation?: CollationOptions

    Specifies a collation.

    filter: Filter<TSchema>

    The filter to limit the updated documents.

    hint?: Hint

    The index to use. If specified, then the query system will only consider plans using the hinted index.

    A document or pipeline containing update operators.

    upsert?: boolean

    When true, creates a new document if no document matches the query.