Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

$ilike, $like not working #688

Closed
toplinuxsir opened this issue Mar 29, 2022 · 2 comments
Closed

$ilike, $like not working #688

toplinuxsir opened this issue Mar 29, 2022 · 2 comments
Labels

Comments

@toplinuxsir
Copy link

Describe the bug

$ilike and $like not working,
The query url:

I have a table: t_product_type
and query for it :
http://127.0.0.1:8081/smart_erp3/public/t_product_type?prd_barcode='$ilike.B%25'
return nothing
The debug generated sql is

SQL:SELECT json_agg(s) FROM (SELECT * FROM "smart_erp3"."public"."t_product_type" WHERE "prd_barcode" ILIKE $1 ) s parameters: ['BX%']

But i run the sql above in db console ,
It returns data.

@avelino
Copy link
Member

avelino commented Mar 29, 2022

you are using ' in the wrong place, your URI should be

/smart_erp3/public/t_product_type?prd_barcode=$ilike.B%25

this query should return all records that prd_barcode starts with B or b

@toplinuxsir
Copy link
Author

@avelino Thanks it woks!

@prest prest locked and limited conversation to collaborators Mar 30, 2022
@avelino avelino converted this issue into discussion #689 Mar 30, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

2 participants