Function findById

  • Retrieve a top-level document by its _id field.

    Type Parameters

    Parameters

    • context: Context

      the context object

    • collectionName: string

      name of the collection to search

    • id: string

      the _id value of the root document

    • Optional options: {
          consistentRead?: boolean;
      }

      the the set of options for the search

      • Optional consistentRead?: boolean

        search with strongly consistent reads

    Returns Promise<DocumentType | undefined>

    the stored value, or undefined if not found

    Throws

    when the collection is not found in the context

Generated using TypeDoc