[docs] fix code and response querying foreign table with inner join (#20975)

fix: code and response querying foreign table with inner join

Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
This commit is contained in:
ga1azandCharis authored and GitHub committed 2024-02-06 01:42:20 +00:00
1 parent 40793dc629
commit 643f8110d7
1 file changed
+20 -7
+20 -7
View File
@@ -1208,17 +1208,17 @@ functions:
```swift
struct City: Decodable {
let name: String
let countries: [Country]
}
struct Country: Decodable {
let name: String
let cities: [City]
}
let cities: [City] = try await supabase.database
.from("cities")
.select("name, countries!inner(name)")
.eq("countries.name", value: "Indonesia")
let countries: [Country] = try await supabase.database
.from("countries")
.select("name, cities!inner(name)")
.eq("name", value: "united kingdom")
.execute()
.value
```
@@ -1251,8 +1251,21 @@ functions:
{
"data": [
{
"name": "Bali",
"countries": {"name": "Indonesia"}
"name": "united kingdom",
"cities": [
{
"name": "London"
},
{
"name": "Manchester"
},
{
"name": "Liverpool"
},
{
"name": "Bristol"
}
]
}
],
"status": 200,