Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

docs(postgres-client) update Postgrest API methods

DanielChu562c16348b4d
diff --git a/web/docs/postgrest/client/adj.mdx b/web/docs/postgrest/client/adj.mdx
index 6608171bb94..2b2872c0294 100644
--- a/web/docs/postgrest/client/adj.mdx
+++ b/web/docs/postgrest/client/adj.mdx
@@ -2,6 +2,7 @@
id: adj
title: "adj"
slug: adj
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -10,7 +11,32 @@ import TabItem from '@theme/TabItem';
Finds all rows whose range value on the stated `column` is adjacent to
the specified `range`.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .select('name, id, population_range_millions')
+ .adj('population_range_millions', [70, 185])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -32,7 +58,7 @@ the specified `range`.
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,9 +79,148 @@ The column to filter on.
<div class="method-list-item-description">
The range to filter with.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### With `select()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .select('name, id, population_range_millions')
+ .adj('population_range_millions', [70, 185])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `update()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .update({ name: 'Mordor' })
+ .adj('population_range_millions', [70, 185])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `delete()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .delete()
+ .adj('population_range_millions', [70, 185])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `rpc()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+// Only valid if the Stored Procedure returns a table type.
+const { data, error } = await postgrest
+ .rpc('echo_all_countries')
+ .adj('population_range_millions', [70, 185])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/cd.mdx b/web/docs/postgrest/client/cd.mdx
index 2bdc2bab8b8..05b46ad53a4 100644
--- a/web/docs/postgrest/client/cd.mdx
+++ b/web/docs/postgrest/client/cd.mdx
@@ -2,6 +2,7 @@
id: cd
title: "cd"
slug: cd
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -10,7 +11,32 @@ import TabItem from '@theme/TabItem';
Finds all rows whose json, array, or range value on the stated `column` is
contained by the specified `value`.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .select('name, id, main_exports')
+ .cd('main_exports', ['cars', 'food', 'machine'])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -32,7 +58,7 @@ contained by the specified `value`.
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,9 +79,148 @@ The column to filter on.
<div class="method-list-item-description">
The value to filter with.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### With `select()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .select('name, id, main_exports')
+ .cd('main_exports', ['cars', 'food', 'machine'])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `update()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .update({ name: 'Mordor' })
+ .cd('main_exports', ['orks', 'surveillance', 'evil'])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `delete()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .delete()
+ .cd('main_exports', ['cars', 'food', 'machine'])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `rpc()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+// Only valid if the Stored Procedure returns a table type.
+const { data, error } = await postgrest
+ .rpc('echo_all_countries')
+ .cd('main_exports', ['cars', 'food', 'machine'])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/cs.mdx b/web/docs/postgrest/client/cs.mdx
index d3bd2a94d0c..7d15bc69164 100644
--- a/web/docs/postgrest/client/cs.mdx
+++ b/web/docs/postgrest/client/cs.mdx
@@ -2,6 +2,7 @@
id: cs
title: "cs"
slug: cs
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -10,7 +11,32 @@ import TabItem from '@theme/TabItem';
Finds all rows whose json, array, or range value on the stated `column`
contains the values specified in `value`.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .select('name, id, main_exports')
+ .cs('main_exports', ['oil'])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -32,7 +58,7 @@ contains the values specified in `value`.
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,9 +79,148 @@ The column to filter on.
<div class="method-list-item-description">
The value to filter with.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### With `select()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .select('name, id, main_exports')
+ .cs('main_exports', ['oil'])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `update()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .update({ name: 'Mordor' })
+ .cs('main_exports', ['oil'])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `delete()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .delete()
+ .cs('main_exports', ['oil'])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `rpc()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+// Only valid if the Stored Procedure returns a table type.
+const { data, error } = await postgrest
+ .rpc('echo_all_countries')
+ .cs('main_exports', ['oil'])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/delete.mdx b/web/docs/postgrest/client/delete.mdx
index 7ca1d082f58..7eece8f070f 100644
--- a/web/docs/postgrest/client/delete.mdx
+++ b/web/docs/postgrest/client/delete.mdx
@@ -2,6 +2,7 @@
id: delete
title: "delete"
slug: delete
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -9,7 +10,32 @@ import TabItem from '@theme/TabItem';
Performs a DELETE on the table.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .delete()
+ .match({ id: 666 })
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -31,7 +57,7 @@ Performs a DELETE on the table.
<div class="method-list-item-description">
No description provided.
-
+
</div>
<ul className="method-list-group">
@@ -52,7 +78,7 @@ No description provided.
<div class="method-list-item-description">
If `true`, return the deleted row(s) in the response.
-
+
</div>
</li>
@@ -61,4 +87,50 @@ If `true`, return the deleted row(s) in the response.
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### Delete records
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .delete()
+ .match({ id: 666 })
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/eq.mdx b/web/docs/postgrest/client/eq.mdx
index aa0e1e87709..fcba439531a 100644
--- a/web/docs/postgrest/client/eq.mdx
+++ b/web/docs/postgrest/client/eq.mdx
@@ -2,6 +2,7 @@
id: eq
title: "eq"
slug: eq
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -10,7 +11,32 @@ import TabItem from '@theme/TabItem';
Finds all rows whose value on the stated `column` exactly matches the
specified `value`.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .eq('name', 'The shire')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -32,7 +58,7 @@ specified `value`.
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,9 +79,148 @@ The column to filter on.
<div class="method-list-item-description">
The value to filter with.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### With `select()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .eq('name', 'The shire')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `update()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .update({ name: 'Mordor' })
+ .eq('name', 'San Francisco')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `delete()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .delete()
+ .eq('name', 'Mordor')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `rpc()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+// Only valid if the Stored Procedure returns a table type.
+const { data, error } = await postgrest
+ .rpc('echo_all_cities')
+ .eq('name', 'San Francisco')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/filter.mdx b/web/docs/postgrest/client/filter.mdx
index af5481b5d45..18c8b3459c5 100644
--- a/web/docs/postgrest/client/filter.mdx
+++ b/web/docs/postgrest/client/filter.mdx
@@ -2,6 +2,7 @@
id: filter
title: "filter"
slug: filter
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -9,7 +10,32 @@ import TabItem from '@theme/TabItem';
Finds all rows whose `column` satisfies the filter.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .filter('name', 'eq', 'Paris')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -31,7 +57,7 @@ Finds all rows whose `column` satisfies the filter.
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -52,7 +78,7 @@ The column to filter on.
<div class="method-list-item-description">
The operator to filter with.
-
+
</div>
</li>
@@ -73,9 +99,179 @@ The operator to filter with.
<div class="method-list-item-description">
The value to filter with.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### With `select()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .filter('name', 'eq', 'Paris')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `update()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .update({ name: 'Mordor' })
+ .filter('name', 'eq', 'Paris')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `delete()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .delete()
+ .filter('name', 'eq', 'Paris')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `rpc()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+// Only valid if the Stored Procedure returns a table type.
+const { data, error } = await postgrest
+ .rpc('echo_all_cities')
+ .filter('name', 'eq', 'Paris')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### Filter embedded resources
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, countries ( name )')
+ .filter('countries.name', 'eq', 'France')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/from.mdx b/web/docs/postgrest/client/from.mdx
index 2824c3dbfe8..752cbff0a39 100644
--- a/web/docs/postgrest/client/from.mdx
+++ b/web/docs/postgrest/client/from.mdx
@@ -2,6 +2,7 @@
id: from
title: "from"
slug: from
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -31,7 +32,7 @@ Perform a table operation.
<div class="method-list-item-description">
The table name to operate on.
-
+
</div>
</li>
diff --git a/web/docs/postgrest/client/fts.mdx b/web/docs/postgrest/client/fts.mdx
index 73b87471ea1..9407418253f 100644
--- a/web/docs/postgrest/client/fts.mdx
+++ b/web/docs/postgrest/client/fts.mdx
@@ -2,6 +2,7 @@
id: fts
title: "fts"
slug: fts
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -32,7 +33,7 @@ to_tsquery(`query`).
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,7 +54,7 @@ The column to filter on.
<div class="method-list-item-description">
The Postgres tsquery string to filter with.
-
+
</div>
</li>
@@ -74,7 +75,7 @@ The Postgres tsquery string to filter with.
<div class="method-list-item-description">
No description provided.
-
+
</div>
<ul className="method-list-group">
@@ -95,7 +96,7 @@ No description provided.
<div class="method-list-item-description">
The text search configuration to use.
-
+
</div>
</li>
diff --git a/web/docs/postgrest/client/gt.mdx b/web/docs/postgrest/client/gt.mdx
index 36118c510ab..2f3b4416631 100644
--- a/web/docs/postgrest/client/gt.mdx
+++ b/web/docs/postgrest/client/gt.mdx
@@ -2,6 +2,7 @@
id: gt
title: "gt"
slug: gt
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -10,7 +11,32 @@ import TabItem from '@theme/TabItem';
Finds all rows whose value on the stated `column` is greater than the
specified `value`.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .gt('country_id', 250)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -32,7 +58,7 @@ specified `value`.
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,9 +79,148 @@ The column to filter on.
<div class="method-list-item-description">
The value to filter with.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### With `select()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .gt('country_id', 250)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `update()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .update({ name: 'Mordor' })
+ .gt('country_id', 250)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `delete()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .delete()
+ .gt('country_id', 250)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `rpc()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+// Only valid if the Stored Procedure returns a table type.
+const { data, error } = await postgrest
+ .rpc('echo_all_cities')
+ .gt('country_id', 250)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/gte.mdx b/web/docs/postgrest/client/gte.mdx
index 7d308821a59..6b95a0f147c 100644
--- a/web/docs/postgrest/client/gte.mdx
+++ b/web/docs/postgrest/client/gte.mdx
@@ -2,6 +2,7 @@
id: gte
title: "gte"
slug: gte
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -10,7 +11,32 @@ import TabItem from '@theme/TabItem';
Finds all rows whose value on the stated `column` is greater than or
equal to the specified `value`.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .gte('country_id', 250)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -32,7 +58,7 @@ equal to the specified `value`.
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,9 +79,148 @@ The column to filter on.
<div class="method-list-item-description">
The value to filter with.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### With `select()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .gte('country_id', 250)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `update()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .update({ name: 'Mordor' })
+ .gte('country_id', 250)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `delete()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .delete()
+ .gte('country_id', 250)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `rpc()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+// Only valid if the Stored Procedure returns a table type.
+const { data, error } = await postgrest
+ .rpc('echo_all_cities')
+ .gte('country_id', 250)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/ilike.mdx b/web/docs/postgrest/client/ilike.mdx
index e8f2947f4e5..35d8d15a616 100644
--- a/web/docs/postgrest/client/ilike.mdx
+++ b/web/docs/postgrest/client/ilike.mdx
@@ -2,6 +2,7 @@
id: ilike
title: "ilike"
slug: ilike
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -10,7 +11,32 @@ import TabItem from '@theme/TabItem';
Finds all rows whose value in the stated `column` matches the supplied
`pattern` (case insensitive).
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .ilike('name', '%la%')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -32,7 +58,7 @@ Finds all rows whose value in the stated `column` matches the supplied
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,9 +79,148 @@ The column to filter on.
<div class="method-list-item-description">
The pattern to filter with.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### With `select()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .ilike('name', '%la%')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `update()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .update({ name: 'Mordor' })
+ .ilike('name', '%la%')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `delete()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .delete()
+ .ilike('name', '%la%')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `rpc()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+// Only valid if the Stored Procedure returns a table type.
+const { data, error } = await postgrest
+ .rpc('echo_all_cities')
+ .ilike('name', '%la%')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/in.mdx b/web/docs/postgrest/client/in.mdx
index 2cb1fae8ed4..6290fda018e 100644
--- a/web/docs/postgrest/client/in.mdx
+++ b/web/docs/postgrest/client/in.mdx
@@ -2,6 +2,7 @@
id: in
title: "in"
slug: in
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -10,7 +11,32 @@ import TabItem from '@theme/TabItem';
Finds all rows whose value on the stated `column` is found on the
specified `values`.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .in('name', ['Rio de Janeiro', 'San Francisco'])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -32,7 +58,7 @@ specified `values`.
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,9 +79,148 @@ The column to filter on.
<div class="method-list-item-description">
The values to filter with.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### With `select()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .in('name', ['Rio de Janeiro', 'San Francisco'])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `update()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .update({ name: 'Mordor' })
+ .in('name', ['Rio de Janeiro', 'San Francisco'])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `delete()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .delete()
+ .in('name', ['Rio de Janeiro', 'San Francisco'])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `rpc()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+// Only valid if the Stored Procedure returns a table type.
+const { data, error } = await postgrest
+ .rpc('echo_all_cities')
+ .in('name', ['Rio de Janeiro', 'San Francisco'])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/index.mdx b/web/docs/postgrest/client/index.mdx
index 14a099f71c2..45666cab351 100644
--- a/web/docs/postgrest/client/index.mdx
+++ b/web/docs/postgrest/client/index.mdx
@@ -2,6 +2,7 @@
id: index
title: "PostgREST Client"
slug: postgrest-client
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
diff --git a/web/docs/postgrest/client/initializing.mdx b/web/docs/postgrest/client/initializing.mdx
index 006b987b7b3..9bf3fa6d31b 100644
--- a/web/docs/postgrest/client/initializing.mdx
+++ b/web/docs/postgrest/client/initializing.mdx
@@ -2,6 +2,7 @@
id: initializing
title: "Initializing"
slug: initializing
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -31,7 +32,7 @@ Creates a PostgREST client.
<div class="method-list-item-description">
URL of the PostgREST endpoint.
-
+
</div>
</li>
@@ -52,7 +53,7 @@ URL of the PostgREST endpoint.
<div class="method-list-item-description">
No description provided.
-
+
</div>
<ul className="method-list-group">
@@ -73,7 +74,7 @@ No description provided.
<div class="method-list-item-description">
Postgres schema to switch to.
-
+
</div>
</li>
@@ -94,7 +95,7 @@ Postgres schema to switch to.
<div class="method-list-item-description">
Custom headers.
-
+
</div>
</li>
diff --git a/web/docs/postgrest/client/insert.mdx b/web/docs/postgrest/client/insert.mdx
index ac9164e63fc..db8558484c9 100644
--- a/web/docs/postgrest/client/insert.mdx
+++ b/web/docs/postgrest/client/insert.mdx
@@ -2,6 +2,7 @@
id: insert
title: "insert"
slug: insert
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -9,7 +10,33 @@ import TabItem from '@theme/TabItem';
Performs an INSERT into the table.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .insert([
+ { name: 'The Shire', country_id: 554 }
+ ])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -31,7 +58,7 @@ Performs an INSERT into the table.
<div class="method-list-item-description">
The values to insert.
-
+
</div>
</li>
@@ -52,7 +79,7 @@ The values to insert.
<div class="method-list-item-description">
No description provided.
-
+
</div>
<ul className="method-list-group">
@@ -73,7 +100,7 @@ No description provided.
<div class="method-list-item-description">
If `true`, performs an UPSERT.
-
+
</div>
</li>
@@ -94,7 +121,7 @@ If `true`, performs an UPSERT.
<div class="method-list-item-description">
By default the new record is returned. Set this to 'minimal' if you don't need this value.
-
+
</div>
</li>
@@ -115,7 +142,7 @@ By default the new record is returned. Set this to 'minimal' if you don't need t
<div class="method-list-item-description">
By specifying the `on_conflict` query parameter, you can make UPSERT work on a column(s) that has a UNIQUE constraint.
-
+
</div>
</li>
@@ -124,4 +151,125 @@ By specifying the `on_conflict` query parameter, you can make UPSERT work on a c
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### Create a record
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .insert([
+ { name: 'The Shire', country_id: 554 }
+ ])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### Bulk create
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .insert([
+ { name: 'The Shire', country_id: 554 },
+ { name: 'Rohan', country_id: 555 },
+ ])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### Upsert
+
+For upsert, if set to true, primary key columns would need to be included
+in the data parameter in order for an update to properly happen. Also, primary keys
+used must be natural, not surrogate. There are however,
+[workarounds](https://github.com/PostgREST/postgrest/issues/1118)
+for surrogate primary keys.
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .insert(
+ [
+ { name: 'The Shire', country_id: 554 },
+ { name: 'Rohan', country_id: 555 },
+ { name: 'City by the Bay', country_id:840}
+ ],
+ { upsert: true })
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/installing.mdx b/web/docs/postgrest/client/installing.mdx
index 6a79746870a..c9603950d73 100644
--- a/web/docs/postgrest/client/installing.mdx
+++ b/web/docs/postgrest/client/installing.mdx
@@ -2,6 +2,7 @@
id: installing
title: "Installing"
slug: installing
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
diff --git a/web/docs/postgrest/client/is.mdx b/web/docs/postgrest/client/is.mdx
index 0f77d5ded4b..afb2170ca59 100644
--- a/web/docs/postgrest/client/is.mdx
+++ b/web/docs/postgrest/client/is.mdx
@@ -2,6 +2,7 @@
id: is
title: "is"
slug: is
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -10,7 +11,32 @@ import TabItem from '@theme/TabItem';
A check for exact equality (null, true, false), finds all rows whose
value on the stated `column` exactly match the specified `value`.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .is('name', null)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -32,7 +58,7 @@ value on the stated `column` exactly match the specified `value`.
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,9 +79,148 @@ The column to filter on.
<div class="method-list-item-description">
The value to filter with.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### With `select()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .is('name', null)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `update()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .update({ name: 'Mordor' })
+ .is('name', null)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `delete()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .delete()
+ .is('name', null)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `rpc()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+// Only valid if the Stored Procedure returns a table type.
+const { data, error } = await postgrest
+ .rpc('echo_all_cities')
+ .is('name', null)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/like.mdx b/web/docs/postgrest/client/like.mdx
index ae7d3c0f355..ef8cb89ec41 100644
--- a/web/docs/postgrest/client/like.mdx
+++ b/web/docs/postgrest/client/like.mdx
@@ -2,6 +2,7 @@
id: like
title: "like"
slug: like
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -10,7 +11,32 @@ import TabItem from '@theme/TabItem';
Finds all rows whose value in the stated `column` matches the supplied
`pattern` (case sensitive).
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .like('name', '%la%')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -32,7 +58,7 @@ Finds all rows whose value in the stated `column` matches the supplied
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,9 +79,148 @@ The column to filter on.
<div class="method-list-item-description">
The pattern to filter with.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### With `select()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .like('name', '%la%')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `update()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .update({ name: 'Mordor' })
+ .like('name', '%la%')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `delete()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .delete()
+ .like('name', '%la%')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `rpc()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+// Only valid if the Stored Procedure returns a table type.
+const { data, error } = await postgrest
+ .rpc('echo_all_cities')
+ .like('name', '%la%')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/lt.mdx b/web/docs/postgrest/client/lt.mdx
index 7fa114bbd8f..bf65c8a2f85 100644
--- a/web/docs/postgrest/client/lt.mdx
+++ b/web/docs/postgrest/client/lt.mdx
@@ -2,6 +2,7 @@
id: lt
title: "lt"
slug: lt
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -10,7 +11,32 @@ import TabItem from '@theme/TabItem';
Finds all rows whose value on the stated `column` is less than the
specified `value`.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .lt('country_id', 250)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -32,7 +58,7 @@ specified `value`.
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,9 +79,148 @@ The column to filter on.
<div class="method-list-item-description">
The value to filter with.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### With `select()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .lt('country_id', 250)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `update()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .update({ name: 'Mordor' })
+ .lt('country_id', 250)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `delete()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .delete()
+ .lt('country_id', 250)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `rpc()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+// Only valid if the Stored Procedure returns a table type.
+const { data, error } = await postgrest
+ .rpc('echo_all_cities')
+ .lt('country_id', 250)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/lte.mdx b/web/docs/postgrest/client/lte.mdx
index 3ff2f34fe4a..e151b1e63bb 100644
--- a/web/docs/postgrest/client/lte.mdx
+++ b/web/docs/postgrest/client/lte.mdx
@@ -2,6 +2,7 @@
id: lte
title: "lte"
slug: lte
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -10,7 +11,32 @@ import TabItem from '@theme/TabItem';
Finds all rows whose value on the stated `column` is less than or equal
to the specified `value`.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .lte('country_id', 250)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -32,7 +58,7 @@ to the specified `value`.
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,9 +79,148 @@ The column to filter on.
<div class="method-list-item-description">
The value to filter with.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### With `select()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .lte('country_id', 250)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `update()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .update({ name: 'Mordor' })
+ .lte('country_id', 250)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `delete()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .delete()
+ .lte('country_id', 250)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `rpc()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+// Only valid if the Stored Procedure returns a table type.
+const { data, error } = await postgrest
+ .rpc('echo_all_cities')
+ .lte('country_id', 250)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/neq.mdx b/web/docs/postgrest/client/neq.mdx
index 8b2681593e8..4aef70c4575 100644
--- a/web/docs/postgrest/client/neq.mdx
+++ b/web/docs/postgrest/client/neq.mdx
@@ -2,6 +2,7 @@
id: neq
title: "neq"
slug: neq
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -10,7 +11,32 @@ import TabItem from '@theme/TabItem';
Finds all rows whose value on the stated `column` doesn't match the
specified `value`.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .neq('name', 'The shire')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -32,7 +58,7 @@ specified `value`.
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,9 +79,148 @@ The column to filter on.
<div class="method-list-item-description">
The value to filter with.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### With `select()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .neq('name', 'The shire')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `update()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .update({ name: 'Mordor' })
+ .neq('name', 'San Francisco')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `delete()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .delete()
+ .neq('name', 'Mordor')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `rpc()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+// Only valid if the Stored Procedure returns a table type.
+const { data, error } = await postgrest
+ .rpc('echo_all_cities')
+ .neq('name', 'Lagos')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/not.mdx b/web/docs/postgrest/client/not.mdx
index 8e8d9312851..4823e6e38e8 100644
--- a/web/docs/postgrest/client/not.mdx
+++ b/web/docs/postgrest/client/not.mdx
@@ -2,6 +2,7 @@
id: not
title: "not"
slug: not
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -9,7 +10,32 @@ import TabItem from '@theme/TabItem';
Finds all rows which doesn't satisfy the filter.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .not('name', 'eq', 'Paris')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -31,7 +57,7 @@ Finds all rows which doesn't satisfy the filter.
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -52,7 +78,7 @@ The column to filter on.
<div class="method-list-item-description">
The operator to filter with.
-
+
</div>
</li>
@@ -73,9 +99,148 @@ The operator to filter with.
<div class="method-list-item-description">
The value to filter with.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### With `select()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name, country_id')
+ .not('name', 'eq', 'Paris')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `update()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .update({ name: 'Mordor' })
+ .not('name', 'eq', 'Paris')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `delete()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .delete()
+ .not('name', 'eq', 'Paris')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `rpc()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+// Only valid if the Stored Procedure returns a table type.
+const { data, error } = await postgrest
+ .rpc('echo_all_cities)
+ .not('name', 'eq', 'Paris')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/nxl.mdx b/web/docs/postgrest/client/nxl.mdx
index d5722e64a93..08650d9abdf 100644
--- a/web/docs/postgrest/client/nxl.mdx
+++ b/web/docs/postgrest/client/nxl.mdx
@@ -2,6 +2,7 @@
id: nxl
title: "nxl"
slug: nxl
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -10,7 +11,32 @@ import TabItem from '@theme/TabItem';
Finds all rows whose range value on the stated `column` does not extend
to the left of the specified `range`.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .select('name, id, population_range_millions')
+ .nxl('population_range_millions', [150, 250])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -32,7 +58,7 @@ to the left of the specified `range`.
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,9 +79,148 @@ The column to filter on.
<div class="method-list-item-description">
The range to filter with.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### With `select()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .select('name, id, population_range_millions')
+ .nxl('population_range_millions', [150, 250])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `update()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .update({ name: 'Mordor' })
+ .nxl('population_range_millions', [150, 250])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `delete()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .delete()
+ .nxl('population_range_millions', [150, 250])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `rpc()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+// Only valid if the Stored Procedure returns a table type.
+const { data, error } = await postgrest
+ .rpc('echo_all_countries')
+ .nxl('population_range_millions', [150, 250])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/nxr.mdx b/web/docs/postgrest/client/nxr.mdx
index 12c87f479f1..9931e6709d6 100644
--- a/web/docs/postgrest/client/nxr.mdx
+++ b/web/docs/postgrest/client/nxr.mdx
@@ -2,6 +2,7 @@
id: nxr
title: "nxr"
slug: nxr
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -10,7 +11,32 @@ import TabItem from '@theme/TabItem';
Finds all rows whose range value on the stated `column` does not extend
to the right of the specified `range`.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .select('name, id, population_range_millions')
+ .nxr('population_range_millions', [150, 250])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -32,7 +58,7 @@ to the right of the specified `range`.
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,9 +79,148 @@ The column to filter on.
<div class="method-list-item-description">
The range to filter with.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### With `select()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .select('name, id, population_range_millions')
+ .nxr('population_range_millions', [150, 250])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `update()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .update({ name: 'Mordor' })
+ .nxr('population_range_millions', [150, 250])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `delete()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .delete()
+ .nxr('population_range_millions', [150, 250])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `rpc()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+// Only valid if the Stored Procedure returns a table type.
+const { data, error } = await postgrest
+ .rpc('echo_all_countries')
+ .nxr('population_range_millions', [150, 250])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/ov.mdx b/web/docs/postgrest/client/ov.mdx
index 7ff538e2ad1..93e36a2c264 100644
--- a/web/docs/postgrest/client/ov.mdx
+++ b/web/docs/postgrest/client/ov.mdx
@@ -2,6 +2,7 @@
id: ov
title: "ov"
slug: ov
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -10,7 +11,32 @@ import TabItem from '@theme/TabItem';
Finds all rows whose array or range value on the stated `column` is
contained by the specified `value`.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .select('name, id, main_exports')
+ .ova('main_exports', ['computers', 'minerals'])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -32,7 +58,7 @@ contained by the specified `value`.
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,9 +79,148 @@ The column to filter on.
<div class="method-list-item-description">
The value to filter with.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### With `select()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .select('name, id, main_exports')
+ .ova('main_exports', ['computers', 'minerals'])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `update()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+let countries = await postgrest
+ .from('countries')
+ .update({ name: 'Mordor' })
+ .ova('main_exports', ['computers', 'minerals'])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `delete()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .delete()
+ .ova('main_exports', ['computers', 'minerals'])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `rpc()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+// Only valid if the Stored Procedure returns a table type.
+const { data, error } = await postgrest
+ .rpc('echo_all_countries')
+ .ova('main_exports', ['computers', 'minerals'])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/phfts.mdx b/web/docs/postgrest/client/phfts.mdx
index 3bc7fee0045..98ccead621d 100644
--- a/web/docs/postgrest/client/phfts.mdx
+++ b/web/docs/postgrest/client/phfts.mdx
@@ -2,6 +2,7 @@
id: phfts
title: "phfts"
slug: phfts
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -32,7 +33,7 @@ phraseto_tsquery(`query`).
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,7 +54,7 @@ The column to filter on.
<div class="method-list-item-description">
The Postgres tsquery string to filter with.
-
+
</div>
</li>
@@ -74,7 +75,7 @@ The Postgres tsquery string to filter with.
<div class="method-list-item-description">
No description provided.
-
+
</div>
<ul className="method-list-group">
@@ -95,7 +96,7 @@ No description provided.
<div class="method-list-item-description">
The text search configuration to use.
-
+
</div>
</li>
diff --git a/web/docs/postgrest/client/plfts.mdx b/web/docs/postgrest/client/plfts.mdx
index 830d5a604d5..b7fc9aefd9d 100644
--- a/web/docs/postgrest/client/plfts.mdx
+++ b/web/docs/postgrest/client/plfts.mdx
@@ -2,6 +2,7 @@
id: plfts
title: "plfts"
slug: plfts
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -32,7 +33,7 @@ plainto_tsquery(`query`).
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,7 +54,7 @@ The column to filter on.
<div class="method-list-item-description">
The Postgres tsquery string to filter with.
-
+
</div>
</li>
@@ -74,7 +75,7 @@ The Postgres tsquery string to filter with.
<div class="method-list-item-description">
No description provided.
-
+
</div>
<ul className="method-list-group">
@@ -95,7 +96,7 @@ No description provided.
<div class="method-list-item-description">
The text search configuration to use.
-
+
</div>
</li>
diff --git a/web/docs/postgrest/client/rpc.mdx b/web/docs/postgrest/client/rpc.mdx
index 4eef658eb86..485cb7519d5 100644
--- a/web/docs/postgrest/client/rpc.mdx
+++ b/web/docs/postgrest/client/rpc.mdx
@@ -1,16 +1,45 @@
---
id: rpc
-title: "rpc"
+title: "Stored Procedures: rpc()"
slug: rpc
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
-Perform a stored procedure call.
+You can call stored procedures as a "Remote Procedure Call".
+That's a fancy way of saying that you can put some logic into your database then call it from anywhere.
+It's especially useful when the logic rarely changes - like password resets and updates.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .rpc('hello_world')
+}
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
## Parameters
@@ -31,7 +60,7 @@ Perform a stored procedure call.
<div class="method-list-item-description">
The function name to call.
-
+
</div>
</li>
@@ -52,9 +81,150 @@ The function name to call.
<div class="method-list-item-description">
The parameters to pass to the function call.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### Call a stored procedure
+
+This is an example invoking a stored procedure.
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .rpc('hello_world')
+}
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With Parameters
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .rpc('echo_city', { name: 'The Shire' })
+}
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### Bulk call
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .rpc('echo_city', [
+ { name: 'The Shire' },
+ { name: 'Mordor' }
+ ])
+}
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With filters.
+
+Stored procedures that return tables can also be combined with
+[Modifiers](/docs/postgrest/client/using-modifiers) and
+[Filters](/docs/postgrest/client/using-filters).
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .rpc('echo_all_cities')
+ .eq('name', 'The Shire')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/select.mdx b/web/docs/postgrest/client/select.mdx
index 2fdc725a318..e601e44d1e2 100644
--- a/web/docs/postgrest/client/select.mdx
+++ b/web/docs/postgrest/client/select.mdx
@@ -2,14 +2,39 @@
id: select
title: "select"
slug: select
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
-Performs horizontal filtering with SELECT.
+Performs vertical filtering with SELECT.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select()
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -31,9 +56,198 @@ Performs horizontal filtering with SELECT.
<div class="method-list-item-description">
The columns to retrieve, separated by commas.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### Getting your data
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select()
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### Selecting specific columns
+
+You can select specific fields from your tables.
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .select('name')
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### Query foreign tables
+
+If your database has relationships, you can query related tables too.
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .select(`
+ name,
+ cities (
+ name
+ )
+ `)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### Query the same foreign table multiple times
+
+Sometimes you will need to query the same foreign table twice.
+In this case, you can use the name of the joined column to identify
+which join you intend to use. For convenience, you can also give an
+alias for each column. For example, if we had a shop of products,
+and we wanted to get the supplier and the purchaser at the same time
+(both in the users) table:
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('products')
+ .select(`
+ id,
+ supplier:supplier_id ( name ),
+ purchaser:purchaser_id ( name )
+ `)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### Quering JSON data
+
+If you have data inside of a JSONB column, you can apply select
+and query filters to the data values. Postgres offers a
+[number of operators](https://www.postgresql.org/docs/9.5/functions-json.html)
+for querying JSON data. Also see
+[PostgREST docs](http://postgrest.org/en/v7.0.0/api.html#json-columns) for more details.
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('products')
+ .select(`
+ id,
+ supplier:supplier_id ( name ),
+ purchaser:purchaser_id ( name )
+ `)
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/sl.mdx b/web/docs/postgrest/client/sl.mdx
index bd1d70c0a57..1360f00a028 100644
--- a/web/docs/postgrest/client/sl.mdx
+++ b/web/docs/postgrest/client/sl.mdx
@@ -2,6 +2,7 @@
id: sl
title: "sl"
slug: sl
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -10,7 +11,32 @@ import TabItem from '@theme/TabItem';
Finds all rows whose range value on the stated `column` is strictly to the
left of the specified `range`.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .select('name, id, population_range_millions')
+ .sl('population_range_millions', [150, 250])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -32,7 +58,7 @@ left of the specified `range`.
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,9 +79,148 @@ The column to filter on.
<div class="method-list-item-description">
The range to filter with.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### With `select()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .select('name, id, population_range_millions')
+ .sl('population_range_millions', [150, 250])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `update()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .update({ name: 'Mordor' })
+ .sl('population_range_millions', [150, 250])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `delete()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .delete()
+ .sl('population_range_millions', [150, 250])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `rpc()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+// Only valid if the Stored Procedure returns a table type.
+const { data, error } = await postgrest
+ .rpc('echo_all_countries')
+ .sl('population_range_millions', [150, 250])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/sr.mdx b/web/docs/postgrest/client/sr.mdx
index b636f046b79..33ba3c44ceb 100644
--- a/web/docs/postgrest/client/sr.mdx
+++ b/web/docs/postgrest/client/sr.mdx
@@ -2,6 +2,7 @@
id: sr
title: "sr"
slug: sr
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -10,7 +11,32 @@ import TabItem from '@theme/TabItem';
Finds all rows whose range value on the stated `column` is strictly to
the right of the specified `range`.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .select('name, id, population_range_millions')
+ .sr('population_range_millions', [150, 250])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -32,7 +58,7 @@ the right of the specified `range`.
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,9 +79,148 @@ The column to filter on.
<div class="method-list-item-description">
The range to filter with.
-
+
</div>
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### With `select()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .select('name, id, population_range_millions')
+ .sr('population_range_millions', [150, 250])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `update()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .update({ name: 'Mordor' })
+ .sr('population_range_millions', [150, 250])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `delete()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('countries')
+ .delete()
+ .sr('population_range_millions', [150, 250])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
+
+### With `rpc()`
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+// Only valid if the Stored Procedure returns a table type.
+const { data, error } = await postgrest
+ .rpc('echo_all_countries')
+ .sr('population_range_millions', [150, 250])
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/update.mdx b/web/docs/postgrest/client/update.mdx
index 8c4160357a8..2d0fed1d3ca 100644
--- a/web/docs/postgrest/client/update.mdx
+++ b/web/docs/postgrest/client/update.mdx
@@ -2,6 +2,7 @@
id: update
title: "update"
slug: update
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -9,7 +10,32 @@ import TabItem from '@theme/TabItem';
Performs an UPDATE on the table.
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .update({ name: 'Middle Earth' })
+ .match({ name: 'Auckland' })
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
## Parameters
@@ -31,7 +57,7 @@ Performs an UPDATE on the table.
<div class="method-list-item-description">
The values to update.
-
+
</div>
</li>
@@ -52,7 +78,7 @@ The values to update.
<div class="method-list-item-description">
No description provided.
-
+
</div>
<ul className="method-list-group">
@@ -73,7 +99,7 @@ No description provided.
<div class="method-list-item-description">
By default the updated record is returned. Set this to 'minimal' if you don't need this value.
-
+
</div>
</li>
@@ -82,4 +108,50 @@ By default the updated record is returned. Set this to 'minimal' if you don't ne
</li>
-</ul>
\ No newline at end of file
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Examples
+
+### Updating your data
+
+
+
+<Tabs
+ defaultValue="js"
+ groupId="libraries"
+ values={[{ label: 'JavaScript', value: 'js' },{ label: 'Python', value: 'py' }]}>
+
+<TabItem value="js">
+
+```js
+const { data, error } = await postgrest
+ .from('cities')
+ .update({ name: 'Middle Earth' })
+ .match({ name: 'Auckland' })
+```
+
+
+</TabItem>
+<TabItem value="py">
+
+```py
+# Not yet implemented
+```
+
+
+</TabItem>
+
+</Tabs>
\ No newline at end of file
diff --git a/web/docs/postgrest/client/wfts.mdx b/web/docs/postgrest/client/wfts.mdx
index 67f0a9c22ad..9b4d0a8e601 100644
--- a/web/docs/postgrest/client/wfts.mdx
+++ b/web/docs/postgrest/client/wfts.mdx
@@ -2,6 +2,7 @@
id: wfts
title: "wfts"
slug: wfts
+custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/postgrest.yml
---
import Tabs from '@theme/Tabs';
@@ -32,7 +33,7 @@ websearch_to_tsquery(`query`).
<div class="method-list-item-description">
The column to filter on.
-
+
</div>
</li>
@@ -53,7 +54,7 @@ The column to filter on.
<div class="method-list-item-description">
The Postgres tsquery string to filter with.
-
+
</div>
</li>
@@ -74,7 +75,7 @@ The Postgres tsquery string to filter with.
<div class="method-list-item-description">
No description provided.
-
+
</div>
<ul className="method-list-group">
@@ -95,7 +96,7 @@ No description provided.
<div class="method-list-item-description">
The text search configuration to use.
-
+
</div>
</li>