Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for programmatic search filters in findAll method #880

Open
syu93 opened this issue Apr 24, 2017 · 0 comments
Open

Support for programmatic search filters in findAll method #880

syu93 opened this issue Apr 24, 2017 · 0 comments

Comments

@syu93
Copy link

syu93 commented Apr 24, 2017

Server version: 2.0.0
Client version: 2.0.0

Is it possible to add the possibility to pass a list of filters to the findAll method, so we can programmatically add multiple filters to the request ?

It's possible just by changing the method signature and check the type of the parameter (if iterable), if not, fallback on iterate over the argument object.

/**
 * @param  {Array} params A list of params objects
 */
TermBase.prototype.findAll = function findAll(fields) {
    var _arguments = fields instanceof Array ? fields : arguments;
    // ...
}; 
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

No branches or pull requests

1 participant