InASunshineState
07/05/2022, 2:43 PMconst { data, error } = await supabase
.from('cities')
.select('name, country_id')
.eq('name', 'The Shire')
can be inferred decently well. From the table cities, select the name and country_id where the name eq(uals) The Shire
but this is contains()
.contains('main_exports', ['oil'])
and containedBy()
.containedBy('main_exports', ['cars', 'food', 'machine'])
and the pages don't even say what they do, so if I tried to read it, I might think "main exports column contains oil" and then "main export columns...is contained by cars? Cars, food and machine are contained by main_exports?" Is it just a semantic swap?
In the PostgreSQL docs they seem really deliberate about "this is how the lefthand bit relates to the righthand bit" which most people maybe don't need to be told but for those that do, even a single sentence could make it incontrovertibly clear. And a baby demo table would let them draw the conclusion on their own.
Might even be fun to have a demo table playground to run the functions against to really bring it home.Steve
07/06/2022, 12:15 AMInASunshineState
07/06/2022, 2:50 AM