Skip to content

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

docs(reference/v2): add missing modifiers

Bobbie Soedirgo7c827376c261
diff --git a/apps/reference/_supabase_js/generated/db-abortsignal.mdx b/apps/reference/_supabase_js/generated/db-abortsignal.mdx
new file mode 100644
index 00000000000..68c5a6beda0
--- /dev/null
+++ b/apps/reference/_supabase_js/generated/db-abortsignal.mdx
@@ -0,0 +1,37 @@
+---
+id: db-abortsignal
+title: 'abortSignal()'
+slug: /db-abortsignal
+custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
+---
+
+import Tabs from '@theme/Tabs'
+import TabItem from '@theme/TabItem'
+
+Set the AbortSignal for the fetch request.
+
+## Parameters
+
+<ul className="method-list-group">
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ signal
+ </span>
+ <span className="method-list-item-label-badge required">
+ required
+ </span>
+ <span className="method-list-item-validation">
+ <code>AbortSignal</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+The AbortSignal to use for the fetch request
+
+ </div>
+
+</li>
+
+</ul>
diff --git a/apps/reference/_supabase_js/generated/db-csv.mdx b/apps/reference/_supabase_js/generated/db-csv.mdx
new file mode 100644
index 00000000000..088f37c669a
--- /dev/null
+++ b/apps/reference/_supabase_js/generated/db-csv.mdx
@@ -0,0 +1,11 @@
+---
+id: db-csv
+title: 'csv()'
+slug: /db-csv
+custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
+---
+
+import Tabs from '@theme/Tabs'
+import TabItem from '@theme/TabItem'
+
+Return `data` as a string in CSV format.
diff --git a/apps/reference/_supabase_js/generated/db-explain.mdx b/apps/reference/_supabase_js/generated/db-explain.mdx
new file mode 100644
index 00000000000..fb748b95f28
--- /dev/null
+++ b/apps/reference/_supabase_js/generated/db-explain.mdx
@@ -0,0 +1,211 @@
+---
+id: db-explain
+title: 'explain()'
+slug: /db-explain
+custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
+---
+
+import Tabs from '@theme/Tabs'
+import TabItem from '@theme/TabItem'
+
+Return `data` as the EXPLAIN plan for the query.
+
+## Parameters
+
+<ul className="method-list-group">
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ options
+ </span>
+ <span className="method-list-item-label-badge required">
+ required
+ </span>
+ <span className="method-list-item-validation">
+ <code>object</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+Named parameters
+
+ </div>
+
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ analyze
+ </span>
+ <span className="method-list-item-label-badge false">
+ optional
+ </span>
+ <span className="method-list-item-validation">
+ <code>boolean</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+If `true`, the query will be executed and the
+actual run time will be returned
+
+ </div>
+
+</li>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ buffers
+ </span>
+ <span className="method-list-item-label-badge false">
+ optional
+ </span>
+ <span className="method-list-item-validation">
+ <code>boolean</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+If `true`, include information on buffer usage
+
+ </div>
+
+</li>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ format
+ </span>
+ <span className="method-list-item-label-badge false">
+ optional
+ </span>
+ <span className="method-list-item-validation">
+ <code>text</code> | <code>json</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+The format of the output, can be `"text"` (default)
+or `"json"`
+
+ </div>
+
+<ul className="method-list-group">
+ <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ json
+ </span>
+ <span className="method-list-item-label-badge required">
+ required
+ </span>
+ <span className="method-list-item-validation">
+ literal
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+No description provided.
+
+ </div>
+
+</li>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ text
+ </span>
+ <span className="method-list-item-label-badge required">
+ required
+ </span>
+ <span className="method-list-item-validation">
+ literal
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+No description provided.
+
+ </div>
+
+</li>
+
+</ul>
+
+</li>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ settings
+ </span>
+ <span className="method-list-item-label-badge false">
+ optional
+ </span>
+ <span className="method-list-item-validation">
+ <code>boolean</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+If `true`, include information on configuration
+parameters that affect query planning
+
+ </div>
+
+</li>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ verbose
+ </span>
+ <span className="method-list-item-label-badge false">
+ optional
+ </span>
+ <span className="method-list-item-validation">
+ <code>boolean</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+If `true`, the query identifier will be returned
+and `data` will include the output columns of the query
+
+ </div>
+
+</li>
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ wal
+ </span>
+ <span className="method-list-item-label-badge false">
+ optional
+ </span>
+ <span className="method-list-item-validation">
+ <code>boolean</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+If `true`, include information on WAL record generation
+
+ </div>
+
+</li>
+
+</ul>
+
+</li>
+
+</ul>
diff --git a/apps/reference/_supabase_js/generated/db-geojson.mdx b/apps/reference/_supabase_js/generated/db-geojson.mdx
new file mode 100644
index 00000000000..d5b2268d728
--- /dev/null
+++ b/apps/reference/_supabase_js/generated/db-geojson.mdx
@@ -0,0 +1,11 @@
+---
+id: db-geojson
+title: 'geojson()'
+slug: /db-geojson
+custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
+---
+
+import Tabs from '@theme/Tabs'
+import TabItem from '@theme/TabItem'
+
+Return `data` as an object in [GeoJSON](https://geojson.org) format.
diff --git a/apps/reference/_supabase_js/generated/db-modifiers-select.mdx b/apps/reference/_supabase_js/generated/db-modifiers-select.mdx
new file mode 100644
index 00000000000..f8f1b003436
--- /dev/null
+++ b/apps/reference/_supabase_js/generated/db-modifiers-select.mdx
@@ -0,0 +1,41 @@
+---
+id: db-modifiers-select
+title: 'select()'
+slug: /db-modifiers-select
+custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
+---
+
+import Tabs from '@theme/Tabs'
+import TabItem from '@theme/TabItem'
+
+Perform a SELECT on the query result.
+
+By default, `.insert()`, `.update()`, `.upsert()`, and `.delete()` do not
+return modified rows. By calling this method, modified rows are returned in
+`data`.
+
+## Parameters
+
+<ul className="method-list-group">
+
+<li className="method-list-item">
+ <h4 className="method-list-item-label">
+ <span className="method-list-item-label-name">
+ columns
+ </span>
+ <span className="method-list-item-label-badge false">
+ optional
+ </span>
+ <span className="method-list-item-validation">
+ <code>Query</code>
+ </span>
+ </h4>
+ <div class="method-list-item-description">
+
+The columns to retrieve, separated by commas
+
+ </div>
+
+</li>
+
+</ul>
diff --git a/apps/reference/_supabase_js/generated/db-rollback.mdx b/apps/reference/_supabase_js/generated/db-rollback.mdx
new file mode 100644
index 00000000000..165dc25110f
--- /dev/null
+++ b/apps/reference/_supabase_js/generated/db-rollback.mdx
@@ -0,0 +1,13 @@
+---
+id: db-rollback
+title: 'rollback()'
+slug: /db-rollback
+custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
+---
+
+import Tabs from '@theme/Tabs'
+import TabItem from '@theme/TabItem'
+
+Rollback the query.
+
+`data` will still be returned, but the query is not committed.
diff --git a/apps/reference/nav/supabase_js_sidebars.js b/apps/reference/nav/supabase_js_sidebars.js
index d4f60a2ff10..228a4dea15e 100644
--- a/apps/reference/nav/supabase_js_sidebars.js
+++ b/apps/reference/nav/supabase_js_sidebars.js
@@ -109,11 +109,17 @@ const sidebars = {
label: 'Modifiers',
items: [
'generated/using-modifiers',
+ 'generated/db-modifiers-select',
'generated/order',
'generated/limit',
'generated/range',
+ 'generated/db-abortsignal',
'generated/single',
'generated/maybesingle',
+ 'generated/db-csv',
+ 'generated/db-geojson',
+ 'generated/db-explain',
+ 'generated/db-rollback',
],
collapsed: true,
},
diff --git a/spec/supabase_js_v2_legacy.yml b/spec/supabase_js_v2_legacy.yml
index 69a255e32d1..507d09aa82e 100644
--- a/spec/supabase_js_v2_legacy.yml
+++ b/spec/supabase_js_v2_legacy.yml
@@ -1964,6 +1964,10 @@ pages:
If a Postgres function returns a table response, you can also apply modifiers to the `rpc()` function.
+ db.modifiers.select():
+ $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.select'
+ title: select()
+
order():
$ref: '@supabase/postgrest-js.PostgrestTransformBuilder.order'
examples:
@@ -2021,6 +2025,10 @@ pages:
.range(0,3)
```
+ db.abortSignal():
+ $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.abortSignal'
+ title: abortSignal()
+
single():
$ref: '@supabase/postgrest-js.PostgrestTransformBuilder.single'
examples:
@@ -2049,6 +2057,22 @@ pages:
.maybeSingle()
```
+ db.csv():
+ $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.csv'
+ title: csv()
+
+ db.geojson():
+ $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.geojson'
+ title: geojson()
+
+ db.explain():
+ $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.explain'
+ title: explain()
+
+ db.rollback():
+ $ref: '@supabase/postgrest-js.PostgrestTransformBuilder.rollback'
+ title: rollback()
+
invoke():
title: 'invoke()'
description: |