QueryProperties

LiveView. QueryProperties

new QueryProperties(initialValuesopt)

Stores detailed information about a LiveView query.
Parameters:
Name Type Attributes Description
initialValues Object <optional>
An object containing initial values for the QueryProperties object's properties. The property names defined in the initialValues object should match those of the corresponding QueryProperties member properties.

Members

includeInternal :boolean

Default Value:
  • false
Flag indicating whether or not the query was configured to include LiveView-internal field values.
Type:
  • boolean

isAggregate :boolean

Default Value:
  • false
Flag indicating whether or not the query is an aggregate query.
Type:
  • boolean

limit :Number

Default Value:
  • -1
If a limit was specified in the query, this is the numerical value of that limit. For example, if the query was 'SELECT * FROM ItemsSales LIMIT 30', then the limit value would be 30. If no limit was specified, then the value will be -1;
Type:
  • Number

orderBy :Array

Default Value:
  • []
An array of objects that define the ORDER BY clause of the query. The order of elements in the array determines the priority of ordering (i.e. orderBy[0] is of the highest priority). The elements in the array contain two properties: fieldName and direction. The fieldName property is the string name that identifies the ORDER BY field. The direction property indicates is a string that indicates what direction to order the values ('ASC' for ascending order and 'DESC' for descending order).
Type:
  • Array

predicate :String

Default Value:
  • null
The predicate or set of conditions appearing in the query's WHERE clause.
Type:
  • String

predicateDelay :Number

Default Value:
  • 0
If a time-delay modifier was added to the WHEN clause, predicateDelay is the value of the delay in milliseconds. For example, if the query was 'SELECT * FROM ItemsSales WHERE price > 100 FOR 1000', then predicateDelay would be 1000). If no time-delay modifier was specified, predicateDelay will be -1.
Type:
  • Number

projection :String

Default Value:
  • null
The projection of the query (i.e. those fields appearing in the query's FROM clause). Stored in CSV format.
Type:
  • String

queryType :String

Default Value:
  • null
One of ['SNAPSHOT', 'CONTINUOUS', 'SNAPSHOT_AND_CONTINUOUS', 'DELETE']
Type:
  • String

schema :Object

Default Value:
  • null
The Schema of the parsed query.
Type:
  • Object

table :String

Default Value:
  • null
The name of the table against which the query will be performed.
Type:
  • String

when :Object

Default Value:
  • null
If a time-window is specified in the query, this object will contain three properties: field, begin, and end. The field property is the string name of the field specified in the WHEN clause. The begin property defines the beginning of the time-window. The end property defines the end of the time-window. For example, if the query is 'SELECT * FROM ItemsSales WHEN transactionTime BETWEEN now()-seconds(30) AND now()', the field would be 'transactionTime', the begin would be 'now()-seconds(30)' and the end would be 'now()'.
Type:
  • Object