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

where field value does not contain wildcard #148

Open
Anecho opened this issue Dec 10, 2023 · 0 comments
Open

where field value does not contain wildcard #148

Anecho opened this issue Dec 10, 2023 · 0 comments

Comments

@Anecho
Copy link

Anecho commented Dec 10, 2023

Hello,

#99 issue is very similar, but was closed with a fix, which actually fixes only #109 , as contains refers to comparison within a string, not a list. It is similar to sql LIKE operator.

So if we have Field1 = APK1234, Field2 = 1234 & Field3 = 5678
$client->where('Field', '!contains', 'APK') or $client->where('Field', 'not like', 'APK') should return only Field2 & Field3
But it does not work, as I am getting 400 Bad Request response: "One or more problems were encountered when parsing the filter: -- line 1 col 29: invalid BoolCompExprTail"

Currently Grammar has these specified as $functions

'contains', 'startswith', 'endswith', 'substringof'

I am aware, that OData does not support invert of contains by default, instead $filter=indexof(Field, 'APK') eq -1 provides inverted behavior.

How can we achieve such functionality with your library?

@Anecho Anecho changed the title where field value does not contain key where field value does not contain wildcard Dec 10, 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

No branches or pull requests

1 participant