Skip to content

$eq custom operator not being used for {testField: 'someValue'} comparisons #274

@hipgnosis

Description

@hipgnosis

There doesn't appear to be a way to override the default equivalency operator (would expect it to fire a custom $eq operator if available).

For example the eqOverride method will execute for {testField: { $eq: 'someValue'}} but will not execute for {testField: 'someValue'}.

Are there any suggestions as to how to handle the second case?

const filter = sift( filterTemp, { operations: { // Works for $eq filters, but not for straight someField: someValue tilers $eq(params, ownerQuery, options) { return createEqualsOperation( (value: any) => eqOverride(value, params), ownerQuery, options, ); } } );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions