AdaptableQL Predicate Technical Reference

Summary

  • The Predicate Options section in Adaptable Options contains many properties to configure Predicates
  • The Predicate API section of AdapTable API provides run-time access to Predicates

Predicate Options

The Predicate Options section of Adaptable Options provides options for managing Predicates.

This includes Custom Predicate Definitions and a set of functions which limit which System Predicates are available.

PropertyTypeDescriptionDefault
caseSensitivePredicatesboolean | ((context:AdaptableColumnContext) => boolean)Perform case-sensitive text comparisons when evaluating Predicatesfalse
customPredicateDefs(AdaptablePredicateDef | AdaptablePredicateDefPartialWithExtends)[]Definitions for Custom provided Predicates[]
evaluateInPredicateUsingTimeboolean | ((context:AdaptableColumnContext) => boolean)Should In Predicate evaluate using datetime, rather than date (the default)false
systemAlertPredicatesSystemAlertPredicateIds| ((context:SystemPredicatesContext<SystemAlertPredicateId>) =>SystemAlertPredicateIds)Which System Predicates are available in Alert Moduleall SystemAlertPredicateIds
systemBadgeStylePredicatesSystemBadgeStylePredicateIds| ((context:SystemPredicatesContext<SystemBadgeStylePredicateId>) =>SystemBadgeStylePredicateIds)Which System Predicates are available for Badge Stylesall SystemBadgeStylePredicateIds
systemFilterPredicatesSystemFilterPredicateIds| ((context:SystemPredicatesContext<SystemFilterPredicateId>) =>SystemFilterPredicateIds)Which System Predicates are available when Filteringall SystemFilterPredicateIds
systemFlashingCellPredicatesSystemFlashingCellPredicateIds| ((context:SystemPredicatesContext<SystemFlashingCellPredicateId>) =>SystemFlashingCellPredicateIds)Which System Predicates are available in Flashing Cell Moduleall SystemFlashingCellPredicateIds
systemFormatColumnPredicatesSystemFormatColumnPredicateIds| ((context:SystemPredicatesContext<SystemFormatColumnPredicateId>) =>SystemFormatColumnPredicateIds)Which System Predicates are available in Format Column Moduleall SystemFormatColumnPredicateIds

Predicate API

The Predicate API section of Adaptable API provides run-time access to Predicates:

MethodReturnsDescription
getCustomPredicateDefById(predicateId)AdaptablePredicateDefGets Predicate Definition provided by users for given Id
getCustomPredicateDefs()AdaptablePredicateDef[]Returns Predicate Definitions provided by users
getPredicateDefById(predicateId)AdaptablePredicateDefGets the Predicate Definition for a given Id
getPredicateDefs()AdaptablePredicateDef[]Returns all current Predicate Definitions
getPredicateDefsByModuleScope(moduleScope)AdaptablePredicateDef[]Retrieves all Predicate Definitions for given Module Scope
getSystemPredicateDefById(predicateId)AdaptablePredicateDefGets Predicate Definition provided by AdapTable for given Id
getSystemPredicateDefs()AdaptablePredicateDef[]Returns Predicate Definitions provided by AdapTable
getSystemPredicateDefsByModuleScope(moduleScope)AdaptablePredicateDef<PREDICATE_TYPE>[]Returns Predicate Definitions provided by AdapTable for given Module Scope
handleColumnPredicate(predicate, params, defaultReturn)booleanSame has handle predicate but it tales into account predicate column id.
handleColumnPredicates(predicate, params, defaultReturn)booleanSame has handle predicates but it tales into account predicate column id.
handlePredicate(predicate, params, defaultReturn)booleanMain Handler function for a Predicate Definition - used by AdapTableQL
handlePredicates(predicates, params, defaultReturn)booleanHandle and compose (with AND) the given Predicate Definitions
isEveryPredicateValid(predicates)booleanChecks if all predicates are valid
isValidPredicate(predicate)booleanChecks whether a given Predicate Definition is valid
predicatesToString(predicates, logicalOperator)stringStringifies a list of Predicate Definitions, using the given logical operator (AND/OR)
predicateToString(predicate)stringStringifies a given Predicate Definition
useCaseSensitivity(columnId)booleanWhether Predicates are evaluated using Case Sensitivity