updateOne(where:to:)

    Updates a single document in this collection matching the given query with the given document.

    Collection+Update.swift:13
    @discardableResult func updateOne(where query: Document, to document: Document) async throws -> UpdateReply

    Parameters

    query

    The query to match documents with

    document

    The document to update the matched document with

    Returns

    The reply from the server

    See https://docs.mongodb.com/manual/reference/command/update/

    Other members in extension

    Instance members