From dfdb91db3abaf23abddcfb39e3445892359a2bd4 Mon Sep 17 00:00:00 2001 From: Bobbie Soedirgo Date: Sat, 6 Mar 2021 23:56:59 -0800 Subject: [PATCH] feat: add docs on `or` embedded filter (#825) --- web/spec/supabase.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/web/spec/supabase.yml b/web/spec/supabase.yml index ec0f5799bfa..f693209fe58 100644 --- a/web/spec/supabase.yml +++ b/web/spec/supabase.yml @@ -117,7 +117,7 @@ pages: The Supabase client is your entrypoint to the rest of the Supabase functionality and is the easiest way to interact with everything we offer within the Supabase ecosystem. - + examples: - name: createClient() js: | @@ -534,8 +534,8 @@ pages: insert(): title: 'Create data: insert()' $ref: '@supabase/postgrest-js."lib/PostgrestQueryBuilder".PostgrestQueryBuilder.insert' - notes: | - - By default, every time you run `insert()`, the client library will make a `select` to return the full record. + notes: | + - By default, every time you run `insert()`, the client library will make a `select` to return the full record. This is convenient, but it can also cause problems if your Policies are not configured to allow the `select` operation. If you are using Row Level Security and you are encountering problems, try setting the `returning` param to `minimal`. examples: @@ -1067,7 +1067,7 @@ pages: ```py # Not yet implemented ``` - - name: User `or` with `and` + - name: Use `or` with `and` isSpotlight: true js: | ```js @@ -1080,6 +1080,19 @@ pages: ```py # Not yet implemented ``` + - name: Use `or` on foreign tables + isSpotlight: true + js: | + ```js + const { data, error } = await supabase + .from('countries') + .select('id, cities(*)') + .or('name.eq.Wellington,name.eq.Paris', { foreignTable: "cities" }) + ``` + py: | + ```py + # Not yet implemented + ``` .not(): $ref: '@supabase/postgrest-js."lib/PostgrestFilterBuilder".PostgrestFilterBuilder.not'