Added select with foreign table
What kind of change does this PR introduce?
This PR introduce capability to query foreign tables using select
What is the current behavior?
Current api does not support querying foreign table like JS version https://supabase.com/docs/reference/javascript/select?example=query-foreign-tables
What is the new behavior?
New API would enable configuring the query to fetch foreign tables similar to JS SDK
Additional context
NA
Hi @DominatorVbN I think the current implementation is already capable of querying foreign tables, and rewriting the JS example you mentioned in Swift, it should be as follows and work as expected.
let response = try await client
.database
.from("countries")
.select(columns: "name,cities(name)")
.execute()
.value
Can you try that within your project and let me know the result?
Hi @DominatorVbN I think the current implementation is already capable of querying foreign tables, and rewriting the JS example you mentioned in Swift, it should be as follows and work as expected.
let response = try await client .database .from("countries") .select(columns: "name,cities(name)") .execute() .valueCan you try that within your project and let me know the result?
Hey, Though this works, this seems like a bit too stringly typed API, can we may be try to alter it in direction where we could maybe write this query using more builder and less string format, which this PR can be a pert of, may be the implementation of the PR might not be optimal, but would like to have discussion around this.
I agree with @DominatorVbN here. The syntax to grab foreign tables seems off here. There should be a more ergonomic way.