Function deleteById

  • Delete a root object using its _id field

    Type Parameters

    Parameters

    • context: Context

      the context object

    • collectionName: string

      the name of the collection

    • id: string

      the object to remove

    • options: {
          condition?: CompositeCondition;
      } = {}

      options to apply

      • Optional condition?: CompositeCondition

        an optional conditional expression that must be satifisfied for the update to proceed

    Returns Promise<DocumentType | undefined>

    the deleted object (as stored in the database), or undefined if not found

    Throws

    when the collection is not found in the context

Generated using TypeDoc