Skip to main content

getExpressionRuleProcessorMongoDBQuery()

getExpressionRuleProcessorMongoDBQuery(serializers?: MongoAggSerializerRegistry): RuleProcessor

Defined in: expr/src/processors/getExpressionRuleProcessorMongoDBQuery.ts:85

Generates a rule processor with expression support for use by formatQuery with the "mongodb_query" format. Expression rules emit MongoDB aggregation-expression form ({ $expr: { ... } }), where field operands become "$field" paths and functions map to native aggregation operators ($add, $multiply, $toUpper, etc.). String-match operators render via $indexOfCP/$substrCP (literal-substring semantics). Pass custom serializers to add functions or override built-ins; they are merged over defaultMongoDBSerializers. Rules without expressions, or with an unsupported operator, fall back to the stock processor.

Parameters​

ParameterType
serializers?MongoAggSerializerRegistry

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.