Skip to content

feat: expose 'paramsToAdapter' method - #390

Closed
fratzinger wants to merge 1 commit into
feathersjs-ecosystem:masterfrom
fratzinger:params-to-adapter
Closed

feat: expose 'paramsToAdapter' method#390
fratzinger wants to merge 1 commit into
feathersjs-ecosystem:masterfrom
fratzinger:params-to-adapter

Conversation

@fratzinger

Copy link
Copy Markdown
Contributor

This is a refactor which exposes a new paramsToAdapter function. It's purpose is to transform feathers params to a sequelize query and have that available from the outside. It's useful for native sequelize functions, like min, max, sum, increment and decrement (see https://sequelize.org/docs/v6/core-concepts/model-querying-basics/#utility-methods).

So it's not a breaking change and doesn't change much for existing use cases but it opens up some opportunities. The tests for utility functions are just some use cases.

@DaddyWarbucks

Copy link
Copy Markdown
Contributor

I like this 👍 . I would like to see this be a pattern on more adapters too. I like that it's a function that defines the relationship between the service method and the adapter method. Params in, adapter method config out.

I wonder if filterParams is a better name, because it aligns better with filterQuery?

@fratzinger fratzinger mentioned this pull request Aug 3, 2022
@fratzinger fratzinger mentioned this pull request Oct 2, 2022
@fratzinger fratzinger closed this Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants