diff --git a/examples/slack-clone-basic/package-lock.json b/examples/slack-clone-basic/package-lock.json
index 327ee084939..26cd6513601 100644
--- a/examples/slack-clone-basic/package-lock.json
+++ b/examples/slack-clone-basic/package-lock.json
@@ -1346,9 +1346,9 @@
}
},
"acorn": {
- "version": "6.4.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz",
- "integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw=="
+ "version": "6.4.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz",
+ "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA=="
},
"adjust-sourcemap-loader": {
"version": "2.0.0",
diff --git a/examples/world/package-lock.json b/examples/world/package-lock.json
index dcacc94b770..9e9a0009c97 100644
--- a/examples/world/package-lock.json
+++ b/examples/world/package-lock.json
@@ -1209,9 +1209,9 @@
}
},
"acorn": {
- "version": "6.4.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz",
- "integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw=="
+ "version": "6.4.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz",
+ "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA=="
},
"adjust-sourcemap-loader": {
"version": "2.0.0",
diff --git a/libraries/supabase-js/package.json b/libraries/supabase-js/package.json
index 14bc66af061..1f6bf8a72fc 100644
--- a/libraries/supabase-js/package.json
+++ b/libraries/supabase-js/package.json
@@ -38,17 +38,17 @@
"babel-plugin-add-module-exports": "^1.0.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.1",
- "babel-preset-minify": "^0.3.0",
+ "babel-preset-minify": "^0.5.1",
"chai": "^4.1.2",
"cross-env": "^5.2.1",
"jest-websocket-mock": "^2.0.1",
- "mocha": "^6.1.3",
- "nyc": "^14.1.1",
- "rimraf": "^2.6.2"
+ "mocha": "^7.1.0",
+ "nyc": "^15.0.0",
+ "rimraf": "^3.0.2"
},
"dependencies": {
"@supabase/doctest-js": "^0.1.0",
- "@supabase/postgrest-js": "^0.8.0",
+ "@supabase/postgrest-js": "^0.9.0",
"@supabase/realtime-js": "^0.1.6",
"superagent": "^5.2.1"
}
diff --git a/web/docs/common/filters/eq.mdx b/web/docs/common/filters/eq.mdx
index 695596c7e2d..3607c2417cf 100644
--- a/web/docs/common/filters/eq.mdx
+++ b/web/docs/common/filters/eq.mdx
@@ -9,17 +9,6 @@ supabase
Finds all rows whose value on the stated columnName exactly matches the specified filterValue. Equivalent of `filter(columName, 'eq', criteria)`.
-
-
-
-```js {3}
-supabase
- .from('countries')
- .eq('name', 'New Zealand')
-```
-
-
-
#### `columnName: string`
Name of the database column.
diff --git a/web/docs/common/filters/filter.mdx b/web/docs/common/filters/filter.mdx
index fdba909fd1a..aec385f123a 100644
--- a/web/docs/common/filters/filter.mdx
+++ b/web/docs/common/filters/filter.mdx
@@ -9,18 +9,6 @@ supabase
This allows you to apply various filters on your query. Filters can also be chained together.
-
-
-
-```js {3-5}
-supabase
- .from('countries')
- .filter('name', 'in', ['China', 'France'])
- .filter('status', 'eq', 'ACTIVE')
-```
-
-
-
#### `columnName: string`
Name of the database column.
diff --git a/web/docs/common/filters/gt.mdx b/web/docs/common/filters/gt.mdx
index 8d3ec19950c..8470390ad04 100644
--- a/web/docs/common/filters/gt.mdx
+++ b/web/docs/common/filters/gt.mdx
@@ -8,17 +8,6 @@ supabase
```
Finds all rows whose value on the stated columnName is greater than the specified filterValue. Eqiuvalent of `filter(columnName, 'gt', criteria)`.
-
-
-
-```js {3}
-supabase
- .from('countries')
- .gt('id', 20)
-```
-
-
-
#### `columnName: string`
Name of database column.
diff --git a/web/docs/common/filters/gte.mdx b/web/docs/common/filters/gte.mdx
index 4e9e237bc79..ed5eae2d38f 100644
--- a/web/docs/common/filters/gte.mdx
+++ b/web/docs/common/filters/gte.mdx
@@ -8,17 +8,6 @@ supabase
```
Finds all rows whose value on the stated columnName is greater than or equal to the specified filterValue. Eqiuvalent of `filter(columnName, 'gte', criteria)`.
-
-
-
-```js {3}
-supabase
- .from('countries')
- .gte('id', 20)
-```
-
-
-
#### `columnName: string`
Name of database column.
diff --git a/web/docs/common/filters/ilike.mdx b/web/docs/common/filters/ilike.mdx
index b8a53782361..0fe84b25193 100644
--- a/web/docs/common/filters/ilike.mdx
+++ b/web/docs/common/filters/ilike.mdx
@@ -9,18 +9,6 @@ supabase
A case-sensitive version of `like()`. Equivalent of `filter(columnName, 'ilike', stringPattern)`.
-
-
-
-```js {3}
-supabase
- .from('countries')
- .ilike('name', '%united%')
-```
-
-
-
-
#### `columnName: string`
Name of database column.
diff --git a/web/docs/common/filters/in.mdx b/web/docs/common/filters/in.mdx
index f5f2d8b1cdd..d59a5981a73 100644
--- a/web/docs/common/filters/in.mdx
+++ b/web/docs/common/filters/in.mdx
@@ -9,17 +9,6 @@ supabase
Finds all rows whose value on the stated columnName is found on the specified filterArray. Equivalent of `filter(columnName, 'in', criteria)`.
-
-
-
-```js {3}
-supabase
- .from('countries')
- .in('name', ['China', 'France'])
-```
-
-
-
#### `columnName: string`
Name of database column.
diff --git a/web/docs/common/filters/is.mdx b/web/docs/common/filters/is.mdx
index 9aebdf18934..821c832333d 100644
--- a/web/docs/common/filters/is.mdx
+++ b/web/docs/common/filters/is.mdx
@@ -10,18 +10,6 @@ supabase
A check for exact equality (**null**, **true**, **false**), finds all rows whose value on the state columnName exactly match the specified filterValue.
Equivalent of `filter(columnName, 'is', filterValue)`.
-
-
-
-```js {3}
-supabase
- .from('countries')
- .is('name', null)
-```
-
-
-
-
#### `columnName: string`
Name of database column.
diff --git a/web/docs/common/filters/like.mdx b/web/docs/common/filters/like.mdx
index 197edd22e3e..e8d288e3fcb 100644
--- a/web/docs/common/filters/like.mdx
+++ b/web/docs/common/filters/like.mdx
@@ -9,18 +9,6 @@ supabase
Finds all rows whose value in the stated columnName matches the supplied pattern. Equivalent of `filter(columnName, 'like', stringPattern)`.
-
-
-
-```js {3}
-supabase
- .from('countries')
- .like('name', '%United%')
-```
-
-
-
-
#### `columnName: string`
Name of database column.
diff --git a/web/docs/common/filters/lt.mdx b/web/docs/common/filters/lt.mdx
index 437984b372a..c35aba41fb5 100644
--- a/web/docs/common/filters/lt.mdx
+++ b/web/docs/common/filters/lt.mdx
@@ -8,17 +8,6 @@ supabase
```
Finds all rows whose value on the stated columnName is less than the specified filterValue. Eqiuvalent of `filter(columnName, 'lt', criteria)`.
-
-
-
-```js {3}
-supabase
- .from('countries')
- .lt('id', 20)
-```
-
-
-
#### `columnName: string`
Name of database column.
diff --git a/web/docs/common/filters/lte.mdx b/web/docs/common/filters/lte.mdx
index 6477ac050be..3d6997332d6 100644
--- a/web/docs/common/filters/lte.mdx
+++ b/web/docs/common/filters/lte.mdx
@@ -8,17 +8,6 @@ supabase
```
Finds all rows whose value on the stated columnName is less than or equal to the specified filterValue. Eqiuvalent of `filter(columnName, 'lte', criteria)`.
-
-
-
-```js {3}
-supabase
- .from('countries')
- .lte('id', 20)
-```
-
-
-
#### `columnName: string`
Name of database column.
diff --git a/web/docs/common/filters/match.mdx b/web/docs/common/filters/match.mdx
index 1f7c030b15f..0d1fff63ec0 100644
--- a/web/docs/common/filters/match.mdx
+++ b/web/docs/common/filters/match.mdx
@@ -7,19 +7,7 @@ supabase
.match(filterObject)
```
-Finds rows that exactly match the specified filterObject. Equivilent of `filter('columnName', 'eq', criteria)`.
-
-
-
-
-```js {3}
-supabase
- .from('countries')
- .match({ 'continent': 'Asia' })
-```
-
-
-
+Finds rows that exactly match the specified filterObject. Equivalent of multiple `filter('columnName', 'eq', criteria)`.
#### `filterObject: object`
An object of `{ 'columnName': 'criteria' }`
diff --git a/web/docs/common/filters/not.mdx b/web/docs/common/filters/not.mdx
index 33fcd5044f6..9d2ca22f21c 100644
--- a/web/docs/common/filters/not.mdx
+++ b/web/docs/common/filters/not.mdx
@@ -9,17 +9,6 @@ supabase
Finds all rows whose value on the stated columnName does not match the specified filterValue. Equivalent of `filter(columnName, 'not', criteria)`.
-
-
-
-```js {3}
-supabase
- .from('countries')
- .not('name', 'China')
-```
-
-
-
#### `columnName: string`
Name of database column.
diff --git a/web/docs/library/delete.mdx b/web/docs/library/delete.mdx
index b5e96bf730b..aacddd7ec15 100644
--- a/web/docs/library/delete.mdx
+++ b/web/docs/library/delete.mdx
@@ -10,7 +10,20 @@ import CommonResponses from '../common/CommonResponses.mdx'
import CommonFilters from '../common/CommonFilters'
import FromFunction from '../common/FromFunction.mdx'
import CustomCodeBlock from '../../src/components/CustomCodeBlock'
-import { deleteRecordJs } from './getExamples'
+import { deleteRecordJs,
+ deleteFilterJs,
+ deleteMatchJs,
+ deleteEqJs,
+ deleteGtJs,
+ deleteLtJs,
+ deleteGteJs,
+ deleteLteJs,
+ deleteLikeJs,
+ deleteIlikeJs,
+ deleteIsJs,
+ deleteInJs,
+ deleteNotJs
+ } from './examples/delete'
@@ -56,48 +69,227 @@ const options = {
----
-
## Filtering
### `filter()`
+
+
+
+
+
### `match()`
+
+
+
+
+
### `eq()`
+
+
+
+
+
### `gt()`
+
+
+
+
+
### `lt()`
+
+
+
+
+
### `gte()`
+
+
+
+
+
### `lte()`
+
+
+
+
+
### `like()`
+
+
+
+
+
### `ilike()`
+
+
+
+
+
### `is()`
+
+
+
+
+
### `in()`
+
+
+
+
+
### `not()`
+
+
+
+
+
## Responses
#### 200 OK
-Successful
+Successful request
\ No newline at end of file
diff --git a/web/docs/library/examples/delete.js b/web/docs/library/examples/delete.js
new file mode 100644
index 00000000000..a462656bd7b
--- /dev/null
+++ b/web/docs/library/examples/delete.js
@@ -0,0 +1,238 @@
+/**
+ * delete.mdx examples
+ */
+
+export const deleteRecordJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+const deleteCity = async () => {
+ try {
+ let values = await supabase
+ .from('cities')
+ .match({ id: 666 })
+ .delete()
+
+ return values
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const deleteFilterJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const deleteCIty = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .filter({'name', 'eq', 'Paris'})
+ .delete()
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const deleteMatchJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const deleteCIty = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .match({name: 'Beijing', country_id: 156})
+ .delete()
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const deleteEqJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const deleteCIty = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .eq('name', 'San Francisco')
+ .delete()
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const deleteGtJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const deleteCIty = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .gt('country_id', 250)
+ .delete()
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const deleteLtJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const deleteCIty = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .lt('country_id', 250)
+ .delete()
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const deleteGteJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const deleteCIty = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .gte('country_id', 250)
+ .delete()
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const deleteLteJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const deleteCIty = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .lte('country_id', 250)
+ .delete()
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const deleteLikeJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const deleteCIty = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .like('name', '%la%')
+ .delete()
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const deleteIlikeJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const deleteCIty = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .ilike('name', '%la%')
+ .delete()
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const deleteIsJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const deleteCIty = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .is('name', null)
+ .delete()
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const deleteInJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const deleteCIty = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .in('name', ['Rio de Janeiro', 'San Francisco'])
+ .delete()
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const deleteNotJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const deleteCIty = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .not('name', 'Lagos')
+ .delete()
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
diff --git a/web/docs/library/examples/get.js b/web/docs/library/examples/get.js
new file mode 100644
index 00000000000..aea77d3b59e
--- /dev/null
+++ b/web/docs/library/examples/get.js
@@ -0,0 +1,351 @@
+/**
+ * get.mdx examples
+ */
+
+export const getSimpleJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getColumnsJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .select('name')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getForeignJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCountries = async () => {
+ try {
+ let countries = await supabase
+ .from('countries')
+ .select(\`
+ name,
+ cities (
+ name
+ )
+ \`)
+ return countries
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getForeignMultipleJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://shop.supabase.co', 'public-key-bOYapLADERfE')
+
+const getProducts = async () => {
+ try {
+ let products = await supabase
+ .from('products')
+ .select(\`
+ id,
+ supplier:supplier_id ( name ),
+ purchaser:purchaser_id ( name )
+ \`)
+ return products
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getOrderJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .order('id')
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getRangeJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .range(0,3)
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getSingleJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .range(0)
+ .single()
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getFilterJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .filter({'name', 'eq', 'Paris'})
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getMatchJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .match({name: 'Beijing', country_id: 156})
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getEqJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .eq('name', 'San Francisco')
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getGtJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .gt('country_id', 250)
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getLtJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .lt('country_id', 250)
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getGteJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .gte('country_id', 250)
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getLteJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .lte('country_id', 250)
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getLikeJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .like('name', '%la%')
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getIlikeJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .ilike('name', '%la%')
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getIsJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .is('name', null)
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getInJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .in('name', ['Rio de Janeiro', 'San Francisco'])
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const getNotJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .not('name', 'Lagos')
+ .select('*')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
diff --git a/web/docs/library/examples/patch.js b/web/docs/library/examples/patch.js
new file mode 100644
index 00000000000..997e073ce9b
--- /dev/null
+++ b/web/docs/library/examples/patch.js
@@ -0,0 +1,238 @@
+/**
+ * patch.mdx examples
+ */
+
+export const patchRecordJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+const updateCityName = async () => {
+ try {
+ let updates = await supabase
+ .from('cities')
+ .update({ name: 'Middle Earth' })
+ .match({ name: 'Auckland' })
+
+ return updates
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const patchFilterJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const updateCityName = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .filter({'name', 'eq', 'Paris'})
+ .update({ name: 'Mordor' })
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const patchMatchJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const updateCityName = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .match({name: 'Beijing', country_id: 156})
+ .update({ name: 'Mordor' })
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const patchEqJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const updateCityName = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .eq('name', 'San Francisco')
+ .update({ name: 'Mordor' })
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const patchGtJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const updateCityName = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .gt('country_id', 250)
+ .update({ name: 'Mordor' })
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const patchLtJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const updateCityName = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .lt('country_id', 250)
+ .update({ name: 'Mordor' })
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const patchGteJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const updateCityName = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .gte('country_id', 250)
+ .update({ name: 'Mordor' })
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const patchLteJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const updateCityName = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .lte('country_id', 250)
+ .update({ name: 'Mordor' })
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const patchLikeJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const updateCityName = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .like('name', '%la%')
+ .update({ name: 'Mordor' })
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const patchIlikeJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const updateCityName = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .ilike('name', '%la%')
+ .update({ name: 'Mordor' })
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const patchIsJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const updateCityName = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .is('name', null)
+ .update({ name: 'Mordor' })
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const patchInJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const updateCityName = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .in('name', ['Rio de Janeiro', 'San Francisco'])
+ .update({ name: 'Mordor' })
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const patchNotJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
+
+const updateCityName = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .not('name', 'Lagos')
+ .update({ name: 'Mordor' })
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
\ No newline at end of file
diff --git a/web/docs/library/examples/post.js b/web/docs/library/examples/post.js
new file mode 100644
index 00000000000..cb23c309327
--- /dev/null
+++ b/web/docs/library/examples/post.js
@@ -0,0 +1,42 @@
+/**
+ * post.mdx examples
+ */
+
+export const postSingleJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+const getCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .insert([
+ { name: 'The Shire', country_id: 554 }
+ ])
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const postBulkJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+const createCities = async () => {
+ try {
+ let cities = await supabase
+ .from('cities')
+ .insert([
+ { name: 'The Shire', country_id: 554 },
+ { name: 'Rohan', country_id: 555 },
+ ])
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
\ No newline at end of file
diff --git a/web/docs/library/examples/stored.js b/web/docs/library/examples/stored.js
new file mode 100644
index 00000000000..f60788ab198
--- /dev/null
+++ b/web/docs/library/examples/stored.js
@@ -0,0 +1,54 @@
+/**
+ * stored-procedures.mdx examples
+ */
+
+export const storedSingleJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+const echoCity = async () => {
+ try{
+ let city = await supabase
+ .rpc('echo_city', { name: 'The Shire' })
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const storedBulkJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+const echoCities = async () => {
+ try{
+ let cities = await supabase
+ .rpc('echo_city', [
+ { name: 'The Shire' },
+ { name: 'Mordor' }
+ ])
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
+
+export const storedReadingJs = `
+import { createClient } from '@supabase/supabase-js'
+
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+const echoCities = async () => {
+ try{
+ let cities = await supabase
+ .rpc('asian_pacific_countries')
+ return cities
+ } catch (error) {
+ console.log('Error: ', error)
+ }
+}
+`
diff --git a/web/docs/library/examples/subscribe.js b/web/docs/library/examples/subscribe.js
new file mode 100644
index 00000000000..bf2eff37e0e
--- /dev/null
+++ b/web/docs/library/examples/subscribe.js
@@ -0,0 +1,128 @@
+/**
+ * subscribe.mdx examples
+ */
+
+export const subscribeAllJs = `
+import { createClient } from '@supabase/supabase-js'
+
+// Create a single supabase client for interacting with your database
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+// Listen to changes
+const mySubscription = supabase
+ .from('*')
+ .on('*', payload => {
+ console.log('Change received!', payload)
+ })
+ .subscribe()
+`
+
+export const subscribeTableJs = `
+import { createClient } from '@supabase/supabase-js'
+
+// Create a single supabase client for interacting with your database
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+// Listen to changes
+const mySubscription = supabase
+ .from('countries')
+ .on('*', payload => {
+ console.log('Change received!', payload)
+ })
+ .subscribe()
+`
+
+export const subscribeInsertsJs = `
+import { createClient } from '@supabase/supabase-js'
+
+// Create a single supabase client for interacting with your database
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+// Listen to changes
+const mySubscription = supabase
+ .from('countries')
+ .on('INSERT', payload => {
+ console.log('Change received!', payload)
+ })
+ .subscribe()
+`
+
+export const subscribeUpdatesJs = `
+import { createClient } from '@supabase/supabase-js'
+
+// Create a single supabase client for interacting with your database
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+// Listen to changes
+const mySubscription = supabase
+ .from('countries')
+ .on('UPDATE', payload => {
+ console.log('Change received!', payload)
+ })
+ .subscribe()
+`
+
+export const subscribeDeletesJs = `
+import { createClient } from '@supabase/supabase-js'
+
+// Create a single supabase client for interacting with your database
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+// Listen to changes
+const mySubscription = supabase
+ .from('countries')
+ .on('DELETE', payload => {
+ console.log('Change received!', payload)
+ })
+ .subscribe()
+`
+
+export const subscribeMultipleJs = `
+import { createClient } from '@supabase/supabase-js'
+
+// Create a single supabase client for interacting with your database
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+// Listen to changes
+const mySubscription = supabase
+ .from('countries')
+ .on('INSERT', handleRecordInserted)
+ .on('DELETE', handleRecordDeleted)
+ .subscribe()
+`
+
+export const subscribeUnsubscribeJs = `
+import { createClient } from '@supabase/supabase-js'
+
+// Create a single supabase client for interacting with your database
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+// Listen to changes
+const mySubscription = supabase
+ .from('countries')
+ .on('*', payload => {
+ console.log('Change received!', payload)
+ })
+ .subscribe()
+
+// Unsubscribe from changes
+mySubscription.unsubscribe()
+`
+
+export const subscribeRemoveJs = `
+import { createClient } from '@supabase/supabase-js'
+
+// Create a single supabase client for interacting with your database
+const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
+
+// Listen to changes
+const mySubscription = supabase
+ .from('countries')
+ .on('*', payload => {
+ console.log('Change received!', payload)
+ })
+ .subscribe()
+
+// Disconnect mySubscription
+supabase.removeSubscription(mySubscription)
+`
diff --git a/web/docs/library/get.mdx b/web/docs/library/get.mdx
index f6cf76b9e5b..9bae9c789c0 100644
--- a/web/docs/library/get.mdx
+++ b/web/docs/library/get.mdx
@@ -12,7 +12,26 @@ import Collapsable from '../../src/components/Collapsable'
import FromFunction from '../common/FromFunction.mdx'
import DummyData from '../common/DummyData.mdx'
import CustomCodeBlock from '../../src/components/CustomCodeBlock'
-import { getSimpleJs, getColumnsJs, getForeignJs, getForeignMultipleJs } from './getExamples'
+import { getSimpleJs,
+ getColumnsJs,
+ getForeignJs,
+ getForeignMultipleJs,
+ getOrderJs,
+ getRangeJs,
+ getSingleJs,
+ getFilterJs,
+ getMatchJs,
+ getEqJs,
+ getGtJs,
+ getLtJs,
+ getGteJs,
+ getLteJs,
+ getLikeJs,
+ getIlikeJs,
+ getIsJs,
+ getInJs,
+ getNotJs
+ } from './examples/get'
@@ -188,6 +207,27 @@ supabase
### `order()`
+
+
+
+
```js {3}
supabase
@@ -210,6 +250,25 @@ Specifies whether null values will be displayed first.
### `range()`
+
+
+
+
```js {3}
supabase
@@ -229,6 +288,22 @@ Index or position of the end of the specified range. If not stated, all remainin
### `single()`
+
+
+
+
```js {3}
supabase
@@ -244,39 +319,257 @@ with `200 OK`. Otherwise, it will return an error with `406 Not Acceptable`.
## Filtering
### `filter()`
+
+
+
+
+
### `match()`
+
+
+
+
+
### `eq()`
+
+
+
+
+
### `gt()`
+
+
+
+
+
### `lt()`
+
+
+
+
+
### `gte()`
+
+
+
+
+
### `lte()`
+
+
+
+
+
### `like()`
+
+
+
+
+
### `ilike()`
+
+
+
+
+
### `is()`
+
+
+
+
+
### `in()`
+
+
+
+
+
### `not()`
+
+
+
+
+
## Responses
diff --git a/web/docs/library/getExamples.js b/web/docs/library/getExamples.js
deleted file mode 100644
index 2be78a1459c..00000000000
--- a/web/docs/library/getExamples.js
+++ /dev/null
@@ -1,353 +0,0 @@
-/**
- * subscribe.mdx examples
- */
-
-export const subscribeAllJs = `
-import { createClient } from '@supabase/supabase-js'
-
-// Create a single supabase client for interacting with your database
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-// Listen to changes
-const mySubscription = supabase
- .from('*')
- .on('*', payload => {
- console.log('Change received!', payload)
- })
- .subscribe()
-`
-
-export const subscribeTableJs = `
-import { createClient } from '@supabase/supabase-js'
-
-// Create a single supabase client for interacting with your database
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-// Listen to changes
-const mySubscription = supabase
- .from('countries')
- .on('*', payload => {
- console.log('Change received!', payload)
- })
- .subscribe()
-`
-
-export const subscribeInsertsJs = `
-import { createClient } from '@supabase/supabase-js'
-
-// Create a single supabase client for interacting with your database
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-// Listen to changes
-const mySubscription = supabase
- .from('countries')
- .on('INSERT', payload => {
- console.log('Change received!', payload)
- })
- .subscribe()
-`
-
-export const subscribeUpdatesJs = `
-import { createClient } from '@supabase/supabase-js'
-
-// Create a single supabase client for interacting with your database
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-// Listen to changes
-const mySubscription = supabase
- .from('countries')
- .on('UPDATE', payload => {
- console.log('Change received!', payload)
- })
- .subscribe()
-`
-
-export const subscribeDeletesJs = `
-import { createClient } from '@supabase/supabase-js'
-
-// Create a single supabase client for interacting with your database
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-// Listen to changes
-const mySubscription = supabase
- .from('countries')
- .on('DELETE', payload => {
- console.log('Change received!', payload)
- })
- .subscribe()
-`
-
-export const subscribeMultipleJs = `
-import { createClient } from '@supabase/supabase-js'
-
-// Create a single supabase client for interacting with your database
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-// Listen to changes
-const mySubscription = supabase
- .from('countries')
- .on('INSERT', handleRecordInserted)
- .on('DELETE', handleRecordDeleted)
- .subscribe()
-`
-
-export const subscribeUnsubscribeJs = `
-import { createClient } from '@supabase/supabase-js'
-
-// Create a single supabase client for interacting with your database
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-// Listen to changes
-const mySubscription = supabase
- .from('countries')
- .on('*', payload => {
- console.log('Change received!', payload)
- })
- .subscribe()
-
-// Unsubscribe from changes
-mySubscription.unsubscribe()
-`
-
-export const subscribeRemoveJs = `
-import { createClient } from '@supabase/supabase-js'
-
-// Create a single supabase client for interacting with your database
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-// Listen to changes
-const mySubscription = supabase
- .from('countries')
- .on('*', payload => {
- console.log('Change received!', payload)
- })
- .subscribe()
-
-// Disconnect mySubscription
-supabase.removeSubscription(mySubscription)
-`
-
-/**
- * get.mdx examples
- */
-
-export const getSimpleJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
-
-const getCities = async () => {
- try {
- let cities = await supabase
- .from('cities')
- .select('*')
- return cities
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
-
-export const getColumnsJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
-
-const getCities = async () => {
- try {
- let cities = await supabase
- .from('cities')
- .select('name')
- return cities
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
-
-export const getForeignJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://world.supabase.co', 'public-key-bOYapLADERfE')
-
-const getCountries = async () => {
- try {
- let countries = await supabase
- .from('countries')
- .select(\`
- name,
- cities (
- name
- )
- \`)
- return countries
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
-
-export const getForeignMultipleJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://shop.supabase.co', 'public-key-bOYapLADERfE')
-
-const getProducts = async () => {
- try {
- let products = await supabase
- .from('products')
- .select(\`
- id,
- supplier:supplier_id ( name ),
- purchaser:purchaser_id ( name )
- \`)
- return products
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
-
-/**
- * post.mdx examples
- */
-
-export const postSingleJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-const getCities = async () => {
- try {
- let cities = await supabase
- .from('cities')
- .insert([
- { name: 'The Shire', country_id: 554 }
- ])
- return cities
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
-
-export const postBulkJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-const createCities = async () => {
- try {
- let cities = await supabase
- .from('cities')
- .insert([
- { name: 'The Shire', country_id: 554 },
- { name: 'Rohan', country_id: 555 },
- ])
- return cities
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
-
-/**
- * patch.mdx examples
- */
-
-export const patchRecordJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-const updateCountryName = async () => {
- try {
- let updates = await supabase
- .from('countries')
- .update({ name: 'Middle Earth' })
- .match({ name: 'New Zealand' })
-
- return updates
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
-
-/**
- * delete.mdx examples
- */
-
-export const deleteRecordJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-const updateCountryName = async () => {
- try {
- let values = await supabase
- .from('cities')
- .match({ id: 666 })
- .delete()
-
- return values
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
-
-/**
- * stored-procedures.mdx examples
- */
-
-export const storedSingleJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-const echoCity = async () => {
- try{
- let city = await supabase
- .rpc('echo_city', { name: 'The Shire' })
- return cities
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
-
-export const storedBulkJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-const echoCities = async () => {
- try{
- let cities = await supabase
- .rpc('echo_city', [
- { name: 'The Shire' },
- { name: 'Mordor' }
- ])
- return cities
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
-
-export const storedReadingJs = `
-import { createClient } from '@supabase/supabase-js'
-
-const supabase = createClient('https://world.supabase.co', '1a2b-3c4d-5e6f-7g8h')
-
-const echoCities = async () => {
- try{
- let cities = await supabase
- .rpc('asian_pacific_countries')
- return cities
- } catch (error) {
- console.log('Error: ', error)
- }
-}
-`
diff --git a/web/docs/library/patch.mdx b/web/docs/library/patch.mdx
index 34f894b0f83..dcce29e3100 100644
--- a/web/docs/library/patch.mdx
+++ b/web/docs/library/patch.mdx
@@ -11,7 +11,20 @@ import CommonResponses from '../common/CommonResponses.mdx'
import CommonFilters from '../common/CommonFilters'
import FromFunction from '../common/FromFunction.mdx'
import CustomCodeBlock from '../../src/components/CustomCodeBlock'
-import { patchRecordJs } from './getExamples'
+import { patchRecordJs,
+ patchFilterJs,
+ patchMatchJs,
+ patchEqJs,
+ patchGtJs,
+ patchLtJs,
+ patchGteJs,
+ patchLteJs,
+ patchLikeJs,
+ patchIlikeJs,
+ patchIsJs,
+ patchInJs,
+ patchNotJs
+ } from './examples/patch'
@@ -22,10 +35,12 @@ import { patchRecordJs } from './getExamples'
js={patchRecordJs}
jsHighlight="{7-10}"
response={`{
- "body": null,
- "status": 204,
- "statusCode": 204,
- "statusText": "No Content"
+ "body": [
+ { "name": "Middle Earth", "country_id": 554 },
+ ],
+ "status": 200,
+ "statusCode": 200,
+ "statusText": "OK"
}`}
/>
@@ -57,44 +72,262 @@ const options = {
## Filtering
### `filter()`
+
+
+
+
+
### `match()`
+
+
+
+
+
### `eq()`
+
+
+
+
+
### `gt()`
+
+
+
+
+
### `lt()`
+
+
+
+
+
### `gte()`
+
+
+
+
+
### `lte()`
+
+
+
+
+
### `like()`
+
+
+
+
+
### `ilike()`
+
+
+
+
+
### `is()`
+
+
+
+
+
### `in()`
+
+
+
+
+
### `not()`
+
+
+
+
+
## Responses
#### 200 OK
-Successful
+Successful request
\ No newline at end of file
diff --git a/web/docs/library/post.mdx b/web/docs/library/post.mdx
index d9c51555896..ed2e85486cc 100644
--- a/web/docs/library/post.mdx
+++ b/web/docs/library/post.mdx
@@ -10,7 +10,7 @@ import Collapsable from '../../src/components/Collapsable'
import CommonResponses from '../common/CommonResponses.mdx'
import FromFunction from '../common/FromFunction.mdx'
import CustomCodeBlock from '../../src/components/CustomCodeBlock'
-import { postSingleJs, postBulkJs } from './getExamples'
+import { postSingleJs, postBulkJs } from './examples/post'
diff --git a/web/docs/library/stored-procedures.mdx b/web/docs/library/stored-procedures.mdx
index 6137bba9af4..a08910ee9ea 100644
--- a/web/docs/library/stored-procedures.mdx
+++ b/web/docs/library/stored-procedures.mdx
@@ -9,7 +9,7 @@ import CommonFilters from '../common/CommonFilters'
import CommonResponses from '../common/CommonResponses.mdx'
import DummyData from '../common/DummyData.mdx'
import CustomCodeBlock from '../../src/components/CustomCodeBlock'
-import { storedSingleJs, storedBulkJs, storedReadingJs } from './getExamples'
+import { storedSingleJs, storedBulkJs, storedReadingJs } from './examples/stored'
You can call stored procedures as a "Remote Procedure Call".
diff --git a/web/docs/library/subscribe.mdx b/web/docs/library/subscribe.mdx
index f7d2c9f669e..34746e099a5 100644
--- a/web/docs/library/subscribe.mdx
+++ b/web/docs/library/subscribe.mdx
@@ -8,7 +8,7 @@ import DummyData from '../common/DummyData.mdx'
import FromFunction from '../common/FromFunction.mdx'
import Collapsable from '../../src/components/Collapsable'
import CustomCodeBlock from '../../src/components/CustomCodeBlock'
-import { subscribeAllJs, subscribeTableJs, subscribeInsertsJs, subscribeUpdatesJs, subscribeDeletesJs, subscribeMultipleJs, subscribeUnsubscribeJs, subscribeRemoveJs } from './getExamples'
+import { subscribeAllJs, subscribeTableJs, subscribeInsertsJs, subscribeUpdatesJs, subscribeDeletesJs, subscribeMultipleJs, subscribeUnsubscribeJs, subscribeRemoveJs } from './examples/subscribe'
Subscribe to realtime changes in your own database.
diff --git a/web/docusaurus.config.js b/web/docusaurus.config.js
index 917d5111d13..d8b7bb15f82 100755
--- a/web/docusaurus.config.js
+++ b/web/docusaurus.config.js
@@ -90,15 +90,6 @@ module.exports = {
// }
],
},
- // {
- // title: "Social",
- // items: [
- // {
- // label: "Blog",
- // to: "blog"
- // }
- // ]
- // }
],
// logo: {
// alt: "Flock",
@@ -121,26 +112,38 @@ module.exports = {
},
],
],
- // customFields: {
- // headerJs: `
- // // FULLSTORY - Please remove after initial user testing.
- // window['_fs_debug'] = false;
- // window['_fs_host'] = 'fullstory.com';
- // window['_fs_script'] = 'edge.fullstory.com/s/fs.js';
- // window['_fs_org'] = 'R5A9Z';
- // window['_fs_namespace'] = 'FS';
- // (function(m,n,e,t,l,o,g,y){
- // if (e in m) {if(m.console && m.console.log) { m.console.log('FullStory namespace conflict. Please set window["_fs_namespace"].');} return;}
- // g=m[e]=function(a,b,s){g.q?g.q.push([a,b,s]):g._api(a,b,s);};g.q=[];
- // o=n.createElement(t);o.async=1;o.crossOrigin='anonymous';o.src='https://'+_fs_script;
- // y=n.getElementsByTagName(t)[0];y.parentNode.insertBefore(o,y);
- // g.identify=function(i,v,s){g(l,{uid:i},s);if(v)g(l,v,s)};g.setUserVars=function(v,s){g(l,v,s)};g.event=function(i,v,s){g('event',{n:i,p:v},s)};
- // g.shutdown=function(){g("rec",!1)};g.restart=function(){g("rec",!0)};
- // g.log = function(a,b) { g("log", [a,b]) };
- // g.consent=function(a){g("consent",!arguments.length||a)};
- // g.identifyAccount=function(i,v){o='account';v=v||{};v.acctId=i;g(o,v)};
- // g.clearUserCookie=function(){};
- // })(window,document,window['_fs_namespace'],'script','user');
- // `,
- // },
+ customFields: {
+ headerJs: `
+
+ var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
+ (function(){
+ var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
+ s1.async=true;
+ s1.src='https://embed.tawk.to/5e0f4c517e39ea1242a2e675/default';
+ s1.charset='UTF-8';
+ s1.setAttribute('crossorigin','*');
+ s0.parentNode.insertBefore(s1,s0);
+ })();
+
+
+ // FULLSTORY - Please remove after initial user testing.
+ // window['_fs_debug'] ~= false;
+ // window['_fs_host'] = 'fullstory.com';
+ // window['_fs_script'] = 'edge.fullstory.com/s/fs.js';
+ // window['_fs_org'] = 'R5A9Z';
+ // window['_fs_namespace'] = 'FS';
+ // (function(m,n,e,t,l,o,g,y){
+ // if (e in m) {if(m.console && m.console.log) { m.console.log('FullStory namespace conflict. Please set window["_fs_namespace"].');} return;}
+ // g=m[e]=function(a,b,s){g.q?g.q.push([a,b,s]):g._api(a,b,s);};g.q=[];
+ // o=n.createElement(t);o.async=1;o.crossOrigin='anonymous';o.src='https://'+_fs_script;
+ // y=n.getElementsByTagName(t)[0];y.parentNode.insertBefore(o,y);
+ // g.identify=function(i,v,s){g(l,{uid:i},s);if(v)g(l,v,s)};g.setUserVars=function(v,s){g(l,v,s)};g.event=function(i,v,s){g('event',{n:i,p:v},s)};
+ // g.shutdown=function(){g("rec",!1)};g.restart=function(){g("rec",!0)};
+ // g.log = function(a,b) { g("log", [a,b]) };
+ // g.consent=function(a){g("consent",!arguments.length||a)};
+ // g.identifyAccount=function(i,v){o='account';v=v||{};v.acctId=i;g(o,v)};
+ // g.clearUserCookie=function(){};
+ // })(window,document,window['_fs_namespace'],'script','user');
+ `,
+ },
}
diff --git a/web/package-lock.json b/web/package-lock.json
index ef0fb5076cd..1430916b023 100644
--- a/web/package-lock.json
+++ b/web/package-lock.json
@@ -1676,9 +1676,9 @@
}
},
"acorn": {
- "version": "6.4.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz",
- "integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw=="
+ "version": "6.4.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz",
+ "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA=="
},
"acorn-walk": {
"version": "6.2.0",
@@ -4993,7 +4993,8 @@
},
"ansi-regex": {
"version": "2.1.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"aproba": {
"version": "1.2.0",
@@ -5011,11 +5012,13 @@
},
"balanced-match": {
"version": "1.0.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
+ "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -5028,15 +5031,18 @@
},
"code-point-at": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"concat-map": {
"version": "0.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"console-control-strings": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -5139,7 +5145,8 @@
},
"inherits": {
"version": "2.0.4",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"ini": {
"version": "1.3.5",
@@ -5149,6 +5156,7 @@
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
+ "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -5161,17 +5169,20 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
+ "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"minipass": {
"version": "2.9.0",
"bundled": true,
+ "optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -5188,6 +5199,7 @@
"mkdirp": {
"version": "0.5.1",
"bundled": true,
+ "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -5268,7 +5280,8 @@
},
"number-is-nan": {
"version": "1.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -5278,6 +5291,7 @@
"once": {
"version": "1.4.0",
"bundled": true,
+ "optional": true,
"requires": {
"wrappy": "1"
}
@@ -5353,7 +5367,8 @@
},
"safe-buffer": {
"version": "5.1.2",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -5383,6 +5398,7 @@
"string-width": {
"version": "1.0.2",
"bundled": true,
+ "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -5400,6 +5416,7 @@
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
+ "optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -5438,11 +5455,13 @@
},
"wrappy": {
"version": "1.0.2",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"yallist": {
"version": "3.1.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
}
}
},
@@ -10139,9 +10158,9 @@
}
},
"recharts": {
- "version": "2.0.0-beta.1",
- "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.0.0-beta.1.tgz",
- "integrity": "sha512-awJH2DE6JRgp5ymzmH5dKh2Pu6prqZJCr3NRaYCcyub1fBa+fIG3ZlpLyl9hWizHPGEvfZLvcjIM+qgTsr9aSQ==",
+ "version": "2.0.0-beta.3",
+ "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.0.0-beta.3.tgz",
+ "integrity": "sha512-NMdG5SRro2q/ovZu8fSwmJgPwSz1sBHlnI1MuR6l5urTeNfgapAcu+72GhXDv8MN48UXxL1Pk+IkWs03SQ/YGw==",
"requires": {
"classnames": "^2.2.5",
"core-js": "^3.4.2",
@@ -12547,7 +12566,8 @@
},
"ansi-regex": {
"version": "2.1.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"aproba": {
"version": "1.2.0",
@@ -12565,11 +12585,13 @@
},
"balanced-match": {
"version": "1.0.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
+ "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -12582,15 +12604,18 @@
},
"code-point-at": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"concat-map": {
"version": "0.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"console-control-strings": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -12693,7 +12718,8 @@
},
"inherits": {
"version": "2.0.4",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"ini": {
"version": "1.3.5",
@@ -12703,6 +12729,7 @@
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
+ "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -12715,17 +12742,20 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
+ "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"minipass": {
"version": "2.9.0",
"bundled": true,
+ "optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -12742,6 +12772,7 @@
"mkdirp": {
"version": "0.5.1",
"bundled": true,
+ "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -12822,7 +12853,8 @@
},
"number-is-nan": {
"version": "1.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -12832,6 +12864,7 @@
"once": {
"version": "1.4.0",
"bundled": true,
+ "optional": true,
"requires": {
"wrappy": "1"
}
@@ -12907,7 +12940,8 @@
},
"safe-buffer": {
"version": "5.1.2",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -12937,6 +12971,7 @@
"string-width": {
"version": "1.0.2",
"bundled": true,
+ "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -12954,6 +12989,7 @@
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
+ "optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -12992,11 +13028,13 @@
},
"wrappy": {
"version": "1.0.2",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"yallist": {
"version": "3.1.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
}
}
},
@@ -13546,7 +13584,8 @@
},
"ansi-regex": {
"version": "2.1.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"aproba": {
"version": "1.2.0",
@@ -13564,11 +13603,13 @@
},
"balanced-match": {
"version": "1.0.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
+ "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -13581,15 +13622,18 @@
},
"code-point-at": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"concat-map": {
"version": "0.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"console-control-strings": {
"version": "1.1.0",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -13692,7 +13736,8 @@
},
"inherits": {
"version": "2.0.4",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"ini": {
"version": "1.3.5",
@@ -13702,6 +13747,7 @@
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
+ "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -13714,17 +13760,20 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
+ "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"minipass": {
"version": "2.9.0",
"bundled": true,
+ "optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
@@ -13741,6 +13790,7 @@
"mkdirp": {
"version": "0.5.1",
"bundled": true,
+ "optional": true,
"requires": {
"minimist": "0.0.8"
}
@@ -13821,7 +13871,8 @@
},
"number-is-nan": {
"version": "1.0.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -13831,6 +13882,7 @@
"once": {
"version": "1.4.0",
"bundled": true,
+ "optional": true,
"requires": {
"wrappy": "1"
}
@@ -13906,7 +13958,8 @@
},
"safe-buffer": {
"version": "5.1.2",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"safer-buffer": {
"version": "2.1.2",
@@ -13936,6 +13989,7 @@
"string-width": {
"version": "1.0.2",
"bundled": true,
+ "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -13953,6 +14007,7 @@
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
+ "optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@@ -13991,11 +14046,13 @@
},
"wrappy": {
"version": "1.0.2",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"yallist": {
"version": "3.1.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
}
}
},
diff --git a/web/package.json b/web/package.json
old mode 100755
new mode 100644
index ae8ba292e17..cdab5eb44d0
--- a/web/package.json
+++ b/web/package.json
@@ -17,7 +17,7 @@
"react-dom": "^16.8.4",
"react-inlinesvg": "^1.2.0",
"react-perfect-scrollbar": "^1.5.3",
- "recharts": "^2.0.0-beta.1"
+ "recharts": "^2.0.0-beta.3"
},
"browserslist": {
"production": [