Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat: expose 'paramsToAdapter' method#390

Closed
fratzinger wants to merge 1 commit intofeathersjs-ecosystem:masterfeathersjs-ecosystem/feathers-sequelize:masterfrom
fratzinger:params-to-adapterfratzinger/feathers-sequelize:params-to-adapterCopy head branch name to clipboard
Closed

feat: expose 'paramsToAdapter' method#390
fratzinger wants to merge 1 commit intofeathersjs-ecosystem:masterfeathersjs-ecosystem/feathers-sequelize:masterfrom
fratzinger:params-to-adapterfratzinger/feathers-sequelize:params-to-adapterCopy head branch name to clipboard

Conversation

@fratzinger
Copy link
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
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.