Skip to main content

getExpressionRuleProcessorSequelize()

getExpressionRuleProcessorSequelize(serializers?: SQLSerializerRegistry): RuleProcessor

Defined in: expr/src/processors/getExpressionRuleProcessorSequelize.ts:61

Generates a rule processor with expression support for use by formatQuery with the "sequelize" format. Expression rules render their LHS (and any expression RHS/bounds) as a SQL fragment (arithmetic via infix, functions via ABS/UPPER/LEAST/…), wrapped in sequelize.literal(...) and compared with sequelize.where(...). Requires these context helpers: sequelizeOperators (the Op object), sequelizeWhere (the where fn), sequelizeLiteral (the literal fn), and sequelizeCol (the col fn). Pass custom serializers to add functions or override built-ins; they are merged over defaultSQLSerializers. Rules without expressions, missing context, or with an unsupported operator, fall back to the stock processor.

Parameters​

ParameterType
serializers?SQLSerializerRegistry

Returns​

RuleProcessor


caution

API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.