RestAPI - ilike

83 views
Skip to first unread message

Vincent Chevrier

unread,
Jan 10, 2024, 10:16:22 AM1/10/24
to py4web
Hi all,

I really like the built-in REST API functionality of pydal very powerful and convenient.

I'd like to have wildcard search capability on the api, which AFAIK can't be done with `contains`. 

However Field objects have the `ilike` and `like` methods which do support wildcards and which `contains` uses under the hood.

I modified pydal trivially by just adding "ilike" to the keywords `RestAPI.search` recognizes and it seems to work fine.

Is there a specific reason there is no support for "like" and "ilike" in the RestAPI?

Thanks
Vincent

Massimo

unread,
Feb 18, 2024, 11:01:06 PM2/18/24
to py4web
No specific reason. If you think it would be valuable make a PR for adding it. 
Message has been deleted

Massimo DiPierro

unread,
Oct 25, 2025, 7:17:44 PMOct 25
to Alan Etkin, py4web
One reason it is not there is that is a very inefficient search and can result in ddos attacks. If we add it there should be a way to enable/disable it

On Sat, Oct 25, 2025, 3:08 PM Alan Etkin <spam...@gmail.com> wrote:
+1 for the feature. I've been watching the rest API feature and I think it would be a good improvement to be able to search by a substring.
BTW: it seems that logical operators to operate with resultsets is not supported either. I.e: support for logical AND/OR in queries. Could new versions of the API support them? Or is there some design reason not to add them?

Regards.

Alan
--
You received this message because you are subscribed to the Google Groups "py4web" group.
To unsubscribe from this group and stop receiving emails from it, send an email to py4web+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/py4web/52c22e61-e11d-426c-8f2f-6c0a714bfe8dn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages