Mongo.find_one_and_update

You're seeing just the function find_one_and_update, go back to Mongo module for more information.
Link to this function

find_one_and_update(topology_pid, coll, filter, update, opts \\ [])

View Source

Specs

find_one_and_update(
  GenServer.server(),
  collection(),
  BSON.document(),
  BSON.document(),
  Keyword.t()
) :: result(BSON.document()) | {:ok, nil}

Finds a document and updates it (using atomic modifiers).

Options

  • :bypass_document_validation - Allows the write to opt-out of document level validation
  • :max_time - The maximum amount of time to allow the query to run (in MS)
  • :projection - Limits the fields to return for all matching documents.
  • :return_document - Returns the replaced or inserted document rather than the original. Values are :before or :after. (default is :before)
  • :sort - Determines which document the operation modifies if the query selects multiple documents.
  • :upsert - Create a document if no document matches the query or updates the document.
  • :collation - Optionally specifies a collation to use in MongoDB 3.4 and