Apply suggestions from code review

Co-authored-by: Copple <10214025+kiwicopple@users.noreply.github.com>
This commit is contained in:
RojandCopple authored and GitHub committed 2022-04-18 19:57:18 +03:00
1 parent c13db73a60
commit 9aa62d767e
3 files changed
+13 -13

No files matched your search

+3 -3
View File
@@ -8,7 +8,7 @@ import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'
PostgreSQL supports flexible [array types](https://www.postgresql.org/docs/12/arrays.html).
These arrays are also supported in the Supabase dashboard and in the API.
These arrays are also supported in the Supabase dashboard and in the JavaScript API.
## Steps
@@ -79,7 +79,7 @@ INSERT INTO arraytest (id, textarray) VALUES (1, ARRAY['Harry', 'Larry', 'Moe'])
</TabItem>
<TabItem value="JavaScript">
To insert a record from the client:
To insert a record from the JavaScript client:
```js
const { data, error } = await supabase
@@ -131,7 +131,7 @@ Your first array data!
### Query Array Data
To query an array, PostgreSQL uses 1-based arrays, so be careful, since you're probably used to 0-based arrays in .
To query an array, PostgreSQL uses 1-based arrays, so be careful, since you're probably used to 0-based arrays in JavaScript.
<Tabs
defaultValue="SQL"
+5 -5
View File
@@ -1,18 +1,18 @@
---
id: plv8
title: "plv8: Language"
description: language for PostgreSQL.
title: "plv8: JavaScript Language"
description: JavaScript language for PostgreSQL.
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
The `plv8` extension allows you use within Postgres.
The `plv8` extension allows you use JavaScript within Postgres.
## Overview
While Postgres natively runs SQL, it can also run other "procedural languages".
`plv8` allows you to run code - specifically any code that runs on the [V8 engine](https://v8.dev).
`plv8` allows you to run JavaScript code - specifically any code that runs on the [V8 JavaScript engine](https://v8.dev).
It can be used for database functions, triggers, queries and more.
@@ -66,7 +66,7 @@ with the `language` identifier set to `plv8`.
```sql
create or replace function function_name()
returns void as $$
// V8
// V8 JavaScript
// code
// here
$$ language plv8;
+5 -5
View File
@@ -1,7 +1,7 @@
---
id: sql-to-api
title: 'Converting SQL to API'
description: Implementing common SQL patterns in the API
title: 'Converting SQL to JavaScript API'
description: Implementing common SQL patterns in the JavaScript API
---
import Tabs from '@theme/Tabs'
@@ -78,6 +78,6 @@ const { data, error } = await supabase
- [Supabase Account - Free Tier OK](https://supabase.com)
- [Postgrest Operators](https://postgrest.org/en/stable/api.html#operators)
- [Supabase API: select](/docs/reference/javascript/select)
- [Supabase API: modifiers](/docs/reference/javascript/using-modifiers)
- [Supabase API: filters](/docs/reference/javascript/using-filters)
- [Supabase API: JavaScript select](/docs/reference/javascript/select)
- [Supabase API: JavaScript modifiers](/docs/reference/javascript/using-modifiers)
- [Supabase API: JavaScript filters](/docs/reference/javascript/using-filters)