From 91a6c2de51ded9f63a1a521af10f29acbbb3d1e9 Mon Sep 17 00:00:00 2001 From: Bobbie Soedirgo Date: Tue, 7 Feb 2023 13:11:37 +0800 Subject: [PATCH 1/3] uh --- spec/supabase_js_v2.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/spec/supabase_js_v2.yml b/spec/supabase_js_v2.yml index 4283df18eca..1e832c9491a 100644 --- a/spec/supabase_js_v2.yml +++ b/spec/supabase_js_v2.yml @@ -1327,12 +1327,6 @@ functions: - id: insert title: 'Create data: insert()' $ref: '@supabase/postgrest-js.PostgrestQueryBuilder.insert' - params: - - name: values - type: object | object [] - isOptional: false - description: | - Bobby Bobby Bobby Bobby Bobby Bobby examples: - id: create-a-record name: Create a record From d28a58d4756954e9c5ddabe9257e7e677a1039b9 Mon Sep 17 00:00:00 2001 From: Bobbie Soedirgo Date: Tue, 7 Feb 2023 13:17:36 +0800 Subject: [PATCH 2/3] fix case --- .../Navigation/NavigationMenu/NavigationMenu.constants.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts index 2eb912b540e..2102ea88648 100644 --- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts +++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts @@ -845,14 +845,14 @@ export const reference = { export const reference_javascript_v1 = { icon: 'reference-javascript', - title: 'javascript', + title: 'JavaScript', url: '/guides/reference/javascript', parent: '/reference', } export const reference_javascript_v2 = { icon: 'reference-javascript', - title: 'javascript', + title: 'JavaScript', url: '/guides/reference/javascript', parent: '/reference', } @@ -873,7 +873,7 @@ export const reference_dart_v1 = { export const reference_csharp_v0 = { icon: 'reference-csharp', - title: 'c#', + title: 'C#', url: 'guides/reference/csharp', parent: '/reference', } From 8079ebabc5c9cb824d533c970c007a73c6fa1656 Mon Sep 17 00:00:00 2001 From: Bobbie Soedirgo Date: Tue, 7 Feb 2023 13:28:50 +0800 Subject: [PATCH 3/3] docs(ref/js): add missing examples --- spec/supabase_js_v2.yml | 113 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/spec/supabase_js_v2.yml b/spec/supabase_js_v2.yml index 1e832c9491a..e8a14cce030 100644 --- a/spec/supabase_js_v2.yml +++ b/spec/supabase_js_v2.yml @@ -972,6 +972,40 @@ functions: .from('countries') .select() ``` + data: + sql: | + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + response: | + ```json + { + "data": [ + { + "id": 1, + "name": "Afghanistan" + }, + { + "id": 2, + "name": "Albania" + }, + { + "id": 3, + "name": "Algeria" + } + ], + "status": 200, + "statusText": "OK" + } + ``` - id: selecting-specific-columns name: Selecting specific columns code: | @@ -980,6 +1014,37 @@ functions: .from('countries') .select('name') ``` + data: + sql: | + ```sql + create table + countries (id int8 primary key, name text); + + insert into + countries (id, name) + values + (1, 'Afghanistan'), + (2, 'Albania'), + (3, 'Algeria'); + ``` + response: | + ```json + { + "data": [ + { + "name": "Afghanistan" + }, + { + "name": "Albania" + }, + { + "name": "Algeria" + } + ], + "status": 200, + "statusText": "OK" + } + ``` - id: query-foreign-tables name: Query foreign tables description: | @@ -995,6 +1060,54 @@ functions: ) `) ``` + data: + sql: | + ```sql + create table + countries (id int8 primary key, name text); + create table + cities ( + id int8 primary key, + country_id int8 not null references countries, + name text + ); + + insert into + countries (id, name) + values + (1, 'Germany'), + (2, 'Indonesia'); + insert into + cities (id, country_id, name) + values + (1, 2, 'Bali'), + (2, 1, 'Munich'); + ``` + response: | + ```json + { + "data": [ + { + "name": "Germany", + "cities": [ + { + "name": "Munich" + } + ] + }, + { + "name": "Indonesia", + "cities": [ + { + "name": "Bali" + } + ] + } + ], + "status": 200, + "statusText": "OK" + } + ``` - id: query-foreign-tables-through-a-join-table name: Query foreign tables through a join table code: |