@jiway/firestorm-core - v1.1.1
    Preparing search index...

    Class ResolutionTree

    Resolution tree

    Index

    Constructors

    Methods

    • Adds all the documents of a collection to the resolution tree

      Type Parameters

      Parameters

      • path: PathLike

        Full path to the collection

      • models: Iterable<T>

        Models to add

      Returns void

    • Adds a document to the resolution tree

      Type Parameters

      Parameters

      • path: PathLike

        Full path to the document

      • model: T

        Model to add

      Returns void

    • Adds multiple documents to the resolution tree

      Type Parameters

      Parameters

      • collectionPath: PathLike

        Full path to the collection this document belongs to

      • models: T[]

        Models to add

      Returns void

    • Gets all documents of a collection in the resolution tree

      Parameters

      • pathLike: PathLike

        Path to the collection

      • ignoreFullness: boolean = false

        If false (default), only gets the documents if the collection node has all the documents of the DB. If true, gets all the documents in the collection even if it may not be all the documents in the DB

      Returns IFirestormModel[] | null

      Gets all the document of the collection or null if the collection isn't full and ignoreFullness is not raised.

    • Gets all documents of a collection in the resolution tree with the type requested

      Type Parameters

      Parameters

      • pathLike: PathLike

        Path to the collection

      • type: Type<T>

        Type of the document

      • ignoreFullness: boolean = false

        If false (default), only gets the documents if the collection node has all the documents of the DB. If true, gets all the documents in the collection even if it may not be all the documents in the DB

      Returns T & IMandatoryFirestormModel[] | null

      Gets all the document of the collection or null if the collection isn't full and ignoreFullness is not raised.

    • Gets a document in the resolution tree

      Parameters

      Returns IFirestormModel | null

      The document if it exists or null if it doesn't

    • Gets a typed document in the resolution tree

      Type Parameters

      Parameters

      • pathLike: PathLike

        Path to the document

      • type: Type<T>

        Type of the document

      Returns T | null

      The document if it exists AND is of the type provided or null if it doesn't