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
| Function | Example | Watches for Changes |
|---|---|---|
| GRID_CHANGE | GRID_CHANGE(MIN([col1]), TIMEFRAME('1h')) | Whole Grid in given timeframe |
| ROW_CHANGE | ROW_CHANGE(MAX([col1]), TIMEFRAME('30s')) | Each row in given timeframe |
| ROW_ADDED | ROW_ADDED() | New row is added to Grid |
| ROW_REMOVED | ROW_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
COUNTchange type also receives a number to indicate the number of changes to observe
| Function | Example | Description |
|---|---|---|
| MIN | GRID_CHANGE(MIN([col1]) | Smallest change of note in the specified column |
| MAX | ROW_CHANGE(MAX([col1]) | Largest change of note in the specified column |
| NONE | ROW_CHANGE(NONE([col1]) | No changes have ocurred in the specified column |
| COUNT | GRID_CHANGE(COUNT([col1], 3) | Given no. of changes ocurred in the specified column |
Timeframe
The TIMEFRAME function sets how long AdapTable should observe changes:
| Function | Example | Description |
|---|---|---|
| TIMEFRAME | ROW_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:
| Function | Example | Description |
|---|---|---|
| WHERE | GRID_CHANGE(MIN([col1]), TIMEFRAME('1h')) WHERE [col12]='USD' | Narrows the scope of the Observable Expression |