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

    Class WhereBlock

    Where clause query block that restricts the query to documents matching the query

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    • Creates a where clause query block that restricts the query to documents matching the query

      Parameters

      • field: string

        The document field on which the clause will be applied

      • operator: WhereFilterOp

        The operation that will be applied to this field

      • value: unknown

        The value against which the the value in the field will be tested

      Returns WhereBlock

    Properties

    field: string

    The document field on which the clause will be applied

    operator: WhereFilterOp

    The operation that will be applied to this field

    value: unknown

    The value against which the the value in the field will be tested

    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 QueryFieldFilterConstraint

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

      Returns QueryConstraint[]

      Firebase query constraints equivalent to this query

    • Appends a where clause to the query

      Parameters

      • field: string

        Field on which the where clause is applied

      • operator: WhereFilterOp

        Operator of the clause

      • value: unknown

        Value to check against the value of the field against

      Returns WhereBlock

      The WhereBlock appended to the query