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

Regexp and ilike filter operators #13

Open
1 of 2 tasks
BackupBroom opened this issue Mar 27, 2017 · 4 comments
Open
1 of 2 tasks

Regexp and ilike filter operators #13

BackupBroom opened this issue Mar 27, 2017 · 4 comments

Comments

@BackupBroom
Copy link

Bug or feature request

  • Bug
  • Feature request

Description of feature (or steps to reproduce if bug)

Loopback currently supports regexp and ilike operators for where filters, but I don't see support for that in this repo. Are there plans to add these two filter operators to this repository?

Thanks.

Expected result

const filterNodes = require('loopback-filters');
const data = [ { name: 'asd' }, { name: 'fAgh' }, {name: 'qwe'}, { name: 'jkAl' }];

filterNodes(data, { where: { name: { regexp: '/\w*[aA]\w*/i' } } }) // asd, fAgh, jkAl
filterNodes(data, { where: { name: { ilike: '%a%' } } }) // same
@bajtos
Copy link
Member

bajtos commented Dec 14, 2017

AFAICT, regexp has been already added by #20. We don't have bandwidth to add support for ilike ourselves, but are happy to help you if you decide to contribute this feature yourself.

@bajtos
Copy link
Member

bajtos commented Dec 14, 2017

Cross-posting my #10 (comment):

Ideally, loopback-datasource-juggler's memory connector would be using loopback-filters under the hood and there was only a single place where to add support for new filtering features. Unfortunately we haven't had bandwidth to do that change, and as a result loopback-filters is always behind loopback capabilities. Any volunteers to contribute this change?

@bajtos
Copy link
Member

bajtos commented Dec 14, 2017

I created a new issue in juggler to keep track of the work of using loopback-filters under the hood: loopbackio/loopback-datasource-juggler#1529

@stale
Copy link

stale bot commented Nov 12, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 12, 2019
@bajtos bajtos removed the stale label Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants