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

    Class OrderByBlock

    Order by query block that orders the documents by a property

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    The direction of the order, ascending or descending

    field: string

    The ordering document field

    Accessors

    • get hasNext(): boolean

      Check whether or not this block as a following block

      Returns boolean

    • get leaf(): QueryBuildBlock

      Gets a reference to the block at the end of the chain

      Returns QueryBuildBlock

    • get next(): QueryBuildBlock | null

      A reference to the next query block or null if this block is the last

      Returns QueryBuildBlock | null

    • set next(value: QueryBuildBlock | null): void

      Sets the reference to the next query block

      Parameters

      Returns void

    • get previous(): QueryBuildBlock | null

      A reference to the previous query block if this block is the first

      Returns QueryBuildBlock | null

    • set previous(value: QueryBuildBlock | null): void

      Sets the reference to the previous query block

      Parameters

      Returns void

    • get root(): QueryBuildBlock

      Gets a reference to the block at the start of the chain

      Returns QueryBuildBlock

    Methods

    • Appends an end-at clause to the query

      Parameters

      • end: EndAtClauseEnd

        Index of the document in the global query from which to start

      • included: boolean = false

        Whether or not to include the document matching the clause

      Returns EndAtBlock

    • Appends a start-at, end-at and limit block to the query to retrieve a portion of the request

      Parameters

      • pageLength: number

        Length of the page

      • pageIndex: number

        Index of the page (0-indexed)

      Returns LimitBlock

    • Converts this block to the corresponding query constraint

      Returns QueryOrderByConstraint

    • Converts the full chain to a firebase set of query constraints

      Returns QueryConstraint[]

      Firebase query constraints equivalent to this query