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

Can't figure out how to do NOT LIKE #146

Open
LinusU opened this issue Mar 23, 2017 · 3 comments
Open

Can't figure out how to do NOT LIKE #146

LinusU opened this issue Mar 23, 2017 · 3 comments

Comments

@LinusU
Copy link
Contributor

LinusU commented Mar 23, 2017

I'm trying to figure out how to do name NOT LIKE '%test%' but I can't quite get it to work. Any ideas?

Some things that I have tried:

name: { $notLike: "%test%" }
name: { $nLike: "%test%" }
name: { $not: { $like: "%test%" } }
name: { $like: { $not: "%test%" } }

Am i missing something obvious? :)

@jrf0110
Copy link
Member

jrf0110 commented Mar 23, 2017

Unfortunately, you'll need to register a conditional helper seen here http://mosql.j0.hn/#/snippets/ae

I'd happily accept a PR to add $notLike and $notILike to the built-in conditional helpers :)

Otherwise, I can get to it when I get to it

@jrf0110
Copy link
Member

jrf0110 commented Mar 23, 2017

oh and if all else fails:

name: { $custom: ['name not like $1', '%test%'] }

@LinusU
Copy link
Contributor Author

LinusU commented Mar 24, 2017

Awesome, quick to answer as always 🙌

I'd be happy to whip up a PR for $notLike and $notILike :)

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

2 participants