1
Support jsonb operators with foreign table
Source: supabase/supabase#27255 · opened by @lorenzofiamingo
I have a model defined as
I would like to get a workplace from my Table, but when I try to read my model in this way
I get a decodable error since Season(id) resolves in an array of json object like {id: "myId0000-0000..."} when I need just a plain array of uuid.
I tried to do the select like this
but is not working as expected. Any idea? I would like to not add custom decoding logic or rpc calls...
The corresponding query RPC would be
but is really poorly maintainable for many tables.
Would be possible to support something like this? .select("*, seasonIdentifiers:Season(id) -> id")
I would like to get a workplace from my Table, but when I try to read my model in this way
I get a decodable error since Season(id) resolves in an array of json object like {id: "myId0000-0000..."} when I need just a plain array of uuid.
I tried to do the select like this
but is not working as expected. Any idea? I would like to not add custom decoding logic or rpc calls...
The corresponding query RPC would be
but is really poorly maintainable for many tables.
Would be possible to support something like this? .select("*, seasonIdentifiers:Season(id) -> id")
No pledges yet. Be the first to back this.
Comments
Similar requests
Improved type inference for JSONB columns with check constraints in supabase typescript client
3 votes · 0 comments
Improve table editor UI for arrays of foreign keys (they aren't supported)
2 votes · 0 comments
Default schema for Foreign Keys
1 vote · 0 comments
Multiple foreign tables in a single "or" statement
14 votes · 0 comments
Update JSONB fragment
5 votes · 0 comments
No comments yet.