Skip to content

memory - Allow custom sift options #125

@DaddyWarbucks

Description

@DaddyWarbucks

Sift allows a second argument of options which can include custom operators, etc. Similar to other database adapters that accept some database config, I think we should allows this adapter to accept params.matcher. Then Sift configuration can happen on each call.

I am aware that the service options takes a matcher option and I can use a custom Sift here. But that is statically set and cannot change per service call.

This should be as simple as updating https://github.com/feathersjs/feathers/blob/9f712bf5694ceb7b47e3c7ab68a30c8a8cec3faa/packages/memory/src/index.ts#L91
to

const matcher = this.options.matcher(query, params.matcher)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions