Observable Expression Functions

Summary

  • This section lists all the Observable Expression Functions shipped with AdapTableQL
  • They are used when creating Observble Expressions

There are 4 Expression Functions available when writing Observable Expressions

FunctionExampleWatches for Changes
GRID_CHANGEGRID_CHANGE(MIN([col1]), TIMEFRAME('1h'))Whole Grid in given timeframe
ROW_CHANGEROW_CHANGE(MAX([col1]), TIMEFRAME('30s'))Each row in given timeframe
ROW_ADDEDROW_ADDED()New row is added to Grid
ROW_REMOVEDROW_REMOVED(3, TIMEFRAME('5m'))Row is removed from Grid

Observable Functions typically receive 2 arguments:

  • Change Type - what type of change for
  • Timeframe - time period in which to observe changes

Change Type

The Change Type in an Observable Expression describes the type of Change that AdapTable observes.

Note

  • Most of these Change Type functions accept the name of the Column as the sole parameter
  • The COUNT change type also receives a number to indicate the number of changes to observe
FunctionExampleDescription
MINGRID_CHANGE(MIN([col1])Smallest change of note in the specified column
MAXROW_CHANGE(MAX([col1])Largest change of note in the specified column
NONEROW_CHANGE(NONE([col1])No changes have ocurred in the specified column
COUNTGRID_CHANGE(COUNT([col1], 3)Given no. of changes ocurred in the specified column

Timeframe

The TIMEFRAME function sets how long AdapTable should observe changes:

FunctionExampleDescription
TIMEFRAMEROW_CHANGE(MIN([col1]), TIMEFRAME('20m'))Timeframe for observed change

Where

The WHERE function keyword can be used with Observable Expressions to limit the Scope of what is being observed:

FunctionExampleDescription
WHEREGRID_CHANGE(MIN([col1]), TIMEFRAME('1h')) WHERE [col12]='USD'Narrows the scope of the Observable Expression