You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello @mevdschee , Happy new year 2025 !
with posgresql, I've a field name data (character varying) containing a json.
suppose this json is {"xxx":"yyy", "zzz":{"www":"sss", "tags":["one", "two", "three"]}}.
I can write
SELECT * FROM public.xxx
WHERE "data"::jsonb ->'zzz'-> 'tags' @> '"two"';
to have the records having tags=two
I'm using a custom controller. Is there a way to make a call to recordService->_list(
with some parameters to create this SQL call ?
my goal could be something like
GET /records/your_table?filter=data->zzz->tags,js,two
[in fact I just need in my case [filter =>"data->zzz->tags,js,two"] (or even ""data"::jsonb ->'zzz'-> 'tags',js,two )
or perhaps if its easier "data, js,zzz->tags:two"
js would be a new keyword if needed to allow "fake" colum name ("data->zzz->tags") : what do you think about that ??
Thx
The text was updated successfully, but these errors were encountered:
hello @mevdschee , Happy new year 2025 !
with posgresql, I've a field name data (character varying) containing a json.
suppose this json is {"xxx":"yyy", "zzz":{"www":"sss", "tags":["one", "two", "three"]}}.
I can write
SELECT * FROM public.xxx
WHERE "data"::jsonb ->'zzz'-> 'tags' @> '"two"';
to have the records having tags=two
I'm using a custom controller. Is there a way to make a call to recordService->_list(
with some parameters to create this SQL call ?
I haven't see anything about json select in json middleware and begin to deep into
https://github.com/mevdschee/php-crud-api/blob/main/src/Tqdev/PhpCrudApi/Database/ConditionsBuilder.php
my goal could be something like
GET /records/your_table?filter=data->zzz->tags,js,two
[in fact I just need in my case [filter =>"data->zzz->tags,js,two"] (or even ""data"::jsonb ->'zzz'-> 'tags',js,two )
or perhaps if its easier "data, js,zzz->tags:two"
js would be a new keyword if needed to allow "fake" colum name ("data->zzz->tags") : what do you think about that ??
Thx
The text was updated successfully, but these errors were encountered: