Documentation / @andrew_l/search-query-language / ParseToMongoOptions
Interface: ParseToMongoOptions ​
Properties ​
allowedKeys? ​
optionalallowedKeys:string[]
A list of allowed keys that can be used in the search query. If provided, any query using keys outside this list will be rejected.
allowEmpty? ​
optionalallowEmpty:boolean
Determines whether empty search queries are allowed. If true, an empty query will return an unfiltered result. If false, an empty query will be rejected.
Default ​
ts
falsemaxOps? ​
optionalmaxOps:number
Max of query ops combination.
Default ​
ts
Infinitytransform? ​
optionaltransform:Readonly<Arrayable<ParseToMongoTransformFn>> |Readonly<Record<string,Readonly<Arrayable<ParseToMongoTransformFn>>>>
A transformation function or a mapping of transformation functions to modify query values before they are converted into a MongoDB query.
- If an array is provided, all functions in the array will be applied.
- If a record object is provided, transformations will be applied based on the corresponding field key.
Example ​
ts
{
'age': MONGO_TRANSFORM.NUMBER
'customer._id': [MONGO_TRANSFORM.OBJECT_ID, MONGO_TRANSFORM.NOT_NULLABLE]
}