AdaptableQL Expression Technical Reference

Summary

  • Expression Options contains many properties to configure AdapTableQl and Expressions
  • The Expression API section of AdapTable API provides run-time access to Expressions

Expression Options

The ExpressionOptions section of Adaptable Options contains options for using AdapTableQL Expressions:

PropertyTypeDescriptionDefault
caseSensitiveExpressionsbooleanPerform case-sensitive text comparisons when evaluating Expressionsfalse
customAggregatedFunctionsRecord<string,AggregatedExpressionFunction> | ((context:GlobalExpressionFunctionsContext<string>) => Record<string,AggregatedExpressionFunction>)Bespoke Aggregated functions - to complement those provided by AdapTable
customBooleanFunctionsRecord<string,ExpressionFunction> | ((context:GlobalExpressionFunctionsContext<BooleanFunctionName>) => Record<string,ExpressionFunction>)Custom Boolean Expression Functions available in AdapTableQLnull (none)
customQueryVariablesRecord<string, string | number | boolean | Date | ((context:CustomQueryVariableContext) => string | number | boolean | Date)>Values to be attached to variables so that a single value can easily be expressed multiple times within a query, or quickly changed to affect the results of a query; evaluated synchronously with each expression evaluation
customScalarFunctionsRecord<string,ExpressionFunction> | ((context:GlobalExpressionFunctionsContext<ScalarFunctionName>) => Record<string,ExpressionFunction>)Custom Scalar Expression Functions available in AdapTableQLnull (none)
displayColumnFriendlyNamesForExpressionsbooleanReference a Column's Header (i.e. FriendlyName) in all Expression overviews (instead of ColumnId)true
evaluateAdaptableQLExternally(context:EvaluateExpressionExternallyContext<TData>) => booleanWhether a Module (or specific expression) should be evaluated by AdapTableQLAll Modules are evaluated by AdapTable
fieldsAdaptableField[] | ((context:AdaptableFieldContext) =>AdaptableField[])Fields are items in Data Source that are NOT columns but can be used in Expressions (via FIELD keyword)
isColumnQueryable(queryableColumnContext:QueryableColumnContext) => booleanCan a given column be included in Expressions
maxTimeframeSizenumberMaximum time (in milliseconds) to hold a Data Change event in a trailing timeframe28800000 (~8 hours)
moduleExpressionFunctionsModuleExpressionFunctionsMap| ((context:ModuleExpressionFunctionsContext) =>ModuleExpressionFunctions | undefined)Module-specific Expression Functions availableundefined (defaults to available System & Custom values)
performExpressionValidationbooleanValidate Expressions before they can be run or savedtrue
systemAggregatedBooleanFunctionsAggregatedBooleanFunctionName[] | ((context:GlobalExpressionFunctionsContext<AggregatedBooleanFunctionName>) =>AggregatedBooleanFunctionName[])System AggregatedBoolean Expression Functions available in AdapTableQLnull (sets all)
systemAggregatedScalarFunctionsAggregatedScalarFunctionName[] | ((context:GlobalExpressionFunctionsContext<AggregatedScalarFunctionName>) =>AggregatedScalarFunctionName[])System AggregatedScalar Expression Functions available in AdapTableQLundefined (sets all)
systemBooleanFunctionsBooleanFunctionName[] | ((context:GlobalExpressionFunctionsContext<BooleanFunctionName>) =>BooleanFunctionName[])System Boolean Expression Functions available in AdapTableQLnull (sets all)
systemObservableFunctionsObservableFunctionName[] | ((context:GlobalExpressionFunctionsContext<ObservableFunctionName>) =>ObservableFunctionName[])System Observable Expression Functions available in AdapTableQLnull (sets all)
systemScalarFunctionsScalarFunctionName[] | ((context:GlobalExpressionFunctionsContext<ScalarFunctionName>) =>ScalarFunctionName[])System Scalar Expression Functions available in AdapTableQLnull (sets all)

Expression API

Expression API section of Adaptable API contains functions which enable run-time access of AdapTableQL.

MethodReturnsDescription
getAdaptableQueryExpression(query)string | undefinedReturns Expression string of given AdaptableQuery: can be Boolean, AggregatedBoolean, Scalar, AggregatedScalar or Observable
getAdaptableQueryExpressionWithColumnFriendlyNames(query)string | undefinedReturns Expression string of given AdaptableQuery with column friendly names (instead of Column IDs)
getASTForExpression(expression)anyRuns the AST that AdapTableQL creates for an Expression - useful when evaluating remotely
getColumnsFromExpression(expression)string[]Returns all Columns referenced in an Expression
isColumnQueryable(abColumn)booleanReturns whether a Column is Queryable
isValidAggregatedBooleanExpression(expression, module, validationErrorMessage)booleanWhether the given AggregatedBooleanExpression is valid
isValidAggregatedScalarExpression(expression, module, validationErrorMessage)booleanWhether the given AggregatedScalarExpression is valid
isValidBooleanExpression(expression, module, validationErrorMessage)booleanWhether the given BooleanExpression is valid
isValidObservableExpression(expression, module, validationErrorMessage)booleanWhether the given ObservableExpression is valid
useCaseSensitivity()booleanWhether Expressions are evaluated using Case Sensitivity