Options
All
  • Public
  • Public/Protected
  • All
Menu

Class KiiClause

Represents a KiiClause expression object

Hierarchy

  • KiiClause

Index

Methods

  • Create a KiiClause with the AND operator concatenating multiple KiiClause objects

    Parameters

    • Rest ...clauses: KiiClause[]

      A variable-length list of KiiClause objects to concatenate

    Returns KiiClause

  • Create an expression of the form (key == value)

    Parameters

    • key: string

      The key to compare

    • value: any

      The key to compare

    Returns KiiClause

  • Create a clause of geo box. This clause inquires objects in the specified rectangle. Rectangle would be placed parallel to the equator with specified coordinates of the corner.

    Parameters

    • key: string

      Key to inquire which holds geo point.

    • northEast: KiiGeoPoint

      North-Eest corner of the rectangle.

    • southWest: KiiGeoPoint

      South-Wast corner of the rectangle.

    Returns KiiClause

  • Create a clause of geo distance. This clause inquires objects in the specified circle.

    Parameters

    • key: string

      Name of the key to inquire, which holds geo point.

    • center: KiiGeoPoint

      Geo point which specify center of the circle.

    • radius: number

      Radius of the circle. unit is meter. value should be in range of ]0, 20000000]

    • putDistanceInto: string

      Used for retrieve distance from the center from the query result.Must match the pattern "^[a-zA-Z_][a-zA-Z0-9_]*$". If the specified value is null, query result will not contain the distance. Note: You can get the results in ascending order of distances from center. To do so, build the orderBy field by "_calculated.{specified value of putDistanceInto}" and pass it in KiiQuery.sortByAsc. Note that, descending order of distances is not supported. The unit of distance is meter.

    Returns KiiClause

  • greaterThan(key: string, value: any): KiiClause
  • Create an expression of the form (key > value)

    Parameters

    • key: string

      The key to compare

    • value: any

      the value to compare

    Returns KiiClause

  • greaterThanOrEqual(key: string, value: any): KiiClause
  • Create an expression of the form (key >= value)

    Parameters

    • key: string

      The key to compare

    • value: any

      the value to compare

    Returns KiiClause

  • hasField(key: string, fieldType: string): KiiClause
  • Create an expression to returns all entities that have a specified field and type.

    Parameters

    • key: string

      name of the specified field.

    • fieldType: string

      The type of the content of the field. The type of the content of the field must be provided, possible values are "STRING", "INTEGER", "DECIMAL" and "BOOLEAN".

    Returns KiiClause

  • Create an expression of the form (key in values)

    Parameters

    • key: string

      The key to compare

    • values: any[]

      to be compared with.

    Returns KiiClause

  • inClause(key: string, values: any[]): KiiClause
  • Create an expression of the form (key in values)

    Parameters

    • key: string

      The key to compare

    • values: any[]

      to be compared with.

    Returns KiiClause

  • Create an expression of the form (key < value)

    Parameters

    • key: string

      The key to compare

    • value: any

      The key to compare

    Returns KiiClause

  • lessThanOrEqual(key: string, value: any): KiiClause
  • Create an expression of the form (key <= value)

    Parameters

    • key: string

      The key to compare

    • value: any

      the value to compare

    Returns KiiClause

  • Create a KiiClause with the NOT operator concatenating a KiiClause object

    Note: Query performance will be worse as the number of objects in bucket increases, so we recommend you avoid the NOT clause if possible.

    Parameters

    • clause: KiiClause

      KiiClause object to negate

    Returns KiiClause

  • notEquals(key: string, value: any): KiiClause
  • Create an expression of the form (key != value)

    Parameters

    • key: string

      The key to compare

    • value: any

      the value to compare

    Returns KiiClause

  • Create a KiiClause with the OR operator concatenating multiple KiiClause objects

    Note: Query performance will be worse as the number of objects in bucket increases, so we recommend you avoid the OR clause if possible.

    Parameters

    • Rest ...clauses: KiiClause[]

      A variable-length list of KiiClause objects to concatenate

    Returns KiiClause

  • startsWith(key: string, value: string): KiiClause
  • Create an expression of the form (key STARTS WITH value)

    Parameters

    • key: string

      The key to compare

    • value: string

      the value to compare

    Returns KiiClause

Generated using TypeDoc