Options
All
  • Public
  • Public/Protected
  • All
Menu

Class QuerySegment<TReturns>

Represents a query expression segment

Type parameters

Hierarchy

Index

Constructors

constructor

  • Parameters

    • _queryRef: Query<TReturns>

    Returns QuerySegment

Properties

Protected _queryRef

_queryRef: Query<TReturns>

Protected _stringValue

_stringValue: string

Methods

Skip

  • Adds a '.SKIP' Content Query segment

    Parameters

    • skipCount: number

      Items to skip

    Returns QuerySegment<TReturns>

Sort

  • Sort<K>(field: K, reverse?: boolean): QuerySegment<TReturns>
  • A '.SORT' Content Query segment

    Type parameters

    • K: keyof TReturns

    Parameters

    • field: K

      The name of the field

    • Default value reverse: boolean = false

      Sort in reverse order, false by default

    Returns QuerySegment<TReturns>

Top

  • A '.TOP' Content Query segment

    Parameters

    • topCount: number

      The TOP item count

    Returns QuerySegment<TReturns>

Protected escapeValue

  • escapeValue(value: string): string
  • Escapes a String value (except '?' and '*' characters for wildcards)

    Parameters

    • value: string

      The String value to be escaped

    Returns string

    The escaped value

Protected finializeSegment

  • Returns QuerySegment<TReturns>

toString

  • toString(): string
  • Returns string

    a segment string value

Generated using TypeDoc