Options
All
  • Public
  • Public/Protected
  • All
Menu

Class QueryExpression<TReturns>

Represents a sensenet Content Query expression

Type parameters

Hierarchy

Index

Constructors

constructor

Properties

Protected _queryRef

_queryRef: Query<TReturns>

Protected _stringValue

_stringValue: string

Methods

Between

  • Between<K>(fieldName: K, minValue: TReturns[K], maxValue: TReturns[K], minimumInclusive?: boolean, maximumInclusive?: boolean): QueryOperators<TReturns>
  • Range search query expression

    Type parameters

    • K: keyof TReturns

    Parameters

    • fieldName: K

      he name of the Field to be checked

    • minValue: TReturns[K]

      The minimum allowed value

    • maxValue: TReturns[K]

      The maximum allowed value

    • Default value minimumInclusive: boolean = false

      Lower limit will be inclusive / exclusive

    • Default value maximumInclusive: boolean = false

      Upper limit will be inclusive / exclusive

    Returns QueryOperators<TReturns>

Equals

  • Equals<K>(fieldName: K | "_Text", value: TReturns[K]): QueryOperators<TReturns>
  • Field equality check content query expression (e.g. +FieldName:'value')

    Type parameters

    • K: keyof TReturns

    Parameters

    • fieldName: K | "_Text"
    • value: TReturns[K]

      The value that will be checked. You can use '?' and '*' wildcards

    Returns QueryOperators<TReturns>

    The Next query operator (fluent)

GreatherThan

  • GreatherThan<K>(fieldName: K, minValue: TReturns[K], minimumInclusive?: boolean): QueryOperators<TReturns>
  • Greather than query expression (+FieldName:>'value')

    Type parameters

    • K: keyof TReturns

    Parameters

    • fieldName: K

      he name of the Field to be checked

    • minValue: TReturns[K]

      The minimum allowed value

    • Default value minimumInclusive: boolean = false

      Lower limit will be inclusive / exclusive

    Returns QueryOperators<TReturns>

InFolder

InTree

LessThan

  • LessThan<K>(fieldName: K, maxValue: TReturns[K], maximumInclusive?: boolean): QueryOperators<TReturns>
  • Less than query expression (+FieldName:<'value')

    Type parameters

    • K: keyof TReturns

    Parameters

    • fieldName: K

      he name of the Field to be checked

    • maxValue: TReturns[K]

      The maximum allowed value

    • Default value maximumInclusive: boolean = false

      Upper limit will be inclusive / exclusive

    Returns QueryOperators<TReturns>

Not

NotEquals

  • NotEquals<K>(fieldName: K, value: TReturns[K]): QueryOperators<TReturns>
  • Field equality and NOT operator combination. (e.g. +NOT(FieldName:'value'))

    Type parameters

    • K: keyof TReturns

    Parameters

    • fieldName: K
    • value: TReturns[K]

      The value that will be checked. You can use '?' and '*' wildcards

    Returns QueryOperators<TReturns>

    The Next query operator (fluent)

Query

Skip

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>

Term

Top

Type

  • Adds a Type content query expression and casts the rest of the expression to a new type

    Type parameters

    Parameters

    • newTypeAssertion: object

      The path string or content that will be used as a root

      • constructor: function
        • new __type(...args: any[]): TNewType

    Returns QueryOperators<TNewType>

    The Next query operator (fluent)

TypeIs

  • TypeIs<TNewType>(newTypeAssertion: object): QueryOperators<TNewType>
  • Adds a TypeIs content query expression and casts the rest of the expression to a new type

    Type parameters

    Parameters

    • newTypeAssertion: object

      The path string or content that will be used as a root

      • constructor: function
        • new __type(...args: any[]): TNewType

    Returns QueryOperators<TNewType>

    The Next query operator (fluent)

Protected escapeValue

  • escapeValue(value: string): string

Protected finialize

Protected finializeSegment

toString

  • toString(): string

Generated using TypeDoc