Skip to content

Commit 0f36519

Browse files
committed
wip
1 parent 208ba48 commit 0f36519

5 files changed

Lines changed: 78 additions & 28 deletions

File tree

sqlite-cloud/platform/apikey.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ To create an API key for a user, click on the **Create API KEY** button.
1616

1717
![Dashboard Create APIKEY](@docs-website-assets/introduction/dashboard_create_apikey.png)
1818

19-
The resulting table will display all the API keys associated with each user, along with their name and restrictions.
19+
The resulting table will display all the API keys associated with each user, along with their name.
2020
![Dashboard List APIKEY](@docs-website-assets/introduction/dashboard_list_apikey.png)

sqlite-cloud/platform/backups.mdx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ status: publish
66
slug: backups
77
---
88

9+
import VideoPlayer from '@commons-components/Video/VideoPlayer.astro';
10+
import enableDisableBackup from '@docs-website-assets/introduction/video/dashboard_enable_disable_backup.mp4';
11+
import restoreBackup from '@docs-website-assets/introduction/video/dashboard_restore_backup.mp4';
12+
913
## Overview
10-
Backups provide a robust solution for mitigating data loss and resolving data corruption issues. Backups are available for databases in all [Pro and Scale](https://www.sqlitecloud.io/pricing) projects.
14+
Backups provide a robust solution for mitigating data loss and resolving data corruption issues. Backups are available for databases in all [Dev, Pro and Startup](https://www.sqlitecloud.io/pricing) projects.
1115

1216
SQLite Cloud creates a full snapshot backup of your data once a day, and stores incremental changes once per second, on commodity object storage.
1317

@@ -23,18 +27,11 @@ SQLite Cloud creates a full snapshot backup of your data once a day, and stores
2327
## Getting Started
2428
Setting up and managing backups in SQLite Cloud is designed to be straightforward, allowing you to implement robust data protection strategies effortlessly.
2529

26-
First, navigate to the backups section.
27-
28-
![Backup Empty](@docs-website-assets/introduction/backup_empty.png)
29-
30-
Then, click on settings to see a list of your databases. From here, you can enable backups for each database.
31-
![Backup Modal](@docs-website-assets/introduction/backup_modal.png)
30+
<VideoPlayer src={enableDisableBackup} />
3231

33-
Click save, and your database backups will appear below.
34-
![Backup Items](@docs-website-assets/introduction/backup_items.png)
3532

3633
### Restoring from a Backup
3734

3835
Click on a backup to begin the restore process. Select Yes to confirm the restoration, and your database will be restored to the selected point in time.
3936

40-
![Restore Backup](@docs-website-assets/introduction/restore_backup.png)
37+
<VideoPlayer src={restoreBackup} />

sqlite-cloud/platform/edge-functions.mdx

Lines changed: 57 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ category: platform
55
status: publish
66
slug: edge-functions
77
---
8+
import VideoPlayer from '@commons-components/Video/VideoPlayer.astro';
9+
import edgeFunctions from '@docs-website-assets/introduction/video/dashboard_edge_functions.mp4';
810

911
Edge functions let you define custom logic to run on the same nodes as your database files for ultra-fast performance.
1012

@@ -15,11 +17,59 @@ Edge functions can be called remotely over HTTP or Websockets via API, or trigge
1517
Turning on linearizable reads ensures strong consistency, but may introduce some latency. When eventual consistency is sufficient, we recommend leaving linearizable reads off.
1618

1719
## Getting Started
18-
1. Navigate to the Edge Functions page from your dashboard.
19-
2. Under "Development", select "Edge Function", then click the "Create" button.
20-
3. Write and test your function.
21-
1. Select the database you want to access and an API key if necessary
22-
2. When you're finished, click deploy.
20+
21+
This guide explains how to create, deploy, and test Edge Functions in the SQLite Cloud UI.
22+
23+
<VideoPlayer src={edgeFunctions} />
24+
25+
26+
27+
1. Open the Edge Functions Section
28+
- From the left-hand sidebar, click the **Edge Functions** icon.
29+
- You will see the list of your functions on the left and the code editor on the right.
30+
31+
2. Create a New Function
32+
- Click the **+** button next to *Filter functions...*.
33+
- Choose the function type: **SQL**, **JavaScript**, or **TypeScript**.
34+
- A new function (e.g., `function-1`) will appear in the list.
35+
36+
3. Write Your Function Code
37+
- Use the editor to implement your logic.
38+
- You can include request parameters, execute SQL queries, and return custom objects.
39+
40+
4. Select the Target Database
41+
- At the bottom of the editor, choose the database (e.g., `chinook.sqlite`).
42+
- You can search and switch databases if needed.
43+
44+
5. Deploy the Function
45+
- Before testing, you must **Deploy** the function.
46+
- Click the **Deploy** button in the bottom-right corner.
47+
- The function is now active and ready to be tested.
48+
49+
6. Test the Function
50+
- After deployment, click **Test**.
51+
- A panel will open on the right where you can configure:
52+
- **User** → choose a user with access to the selected database.
53+
- **API Key** → select the appropriate key.
54+
- **Request Body** → provide JSON input (e.g., `{ "filter": "a" }`).
55+
- **Query Parameters** → add parameters (e.g., `limit = 10`).
56+
- Click **Send Request** to execute the test.
57+
58+
7. Review the Response
59+
- The response will be shown at the bottom of the test panel.
60+
- It includes your custom message, the SQL results, and the request object.
61+
62+
8. Enable Linearizable Reads (Optional)
63+
- If your database is frequently modified and you want strong consistency,
64+
toggle **Linearizable** at the bottom before testing or deploying.
65+
66+
9. View the Function Details
67+
- Switch to the **Details** tab to check deployment information.
68+
- You can see:
69+
- The **last deployed date and time**.
70+
- The **Function URL**, which you can copy and use to call the function from external applications
71+
72+
2373

2474
#### Note:
2575
Functions should return a JSON-serializable object with a data field:
@@ -32,22 +82,16 @@ return {
3282
```
3383

3484
### Authorization
35-
Edge functions that access your SQLite databases must be authorized via API key. You can automatically authorize an edge function on every call by assigning it an API key via the "API KEY" dropdown.
85+
Edge functions that access your SQLite databases must be authorized via API key.
3686

37-
If no API key is assigned, an API key must be sent in the request url as a query parameter (`?apikey=YOUR_API_KEY`) or as an attribute in the request body (`{ apikey: YOUR_API_KEY }`).
87+
An API key must be sent in the request url as a query parameter (`?apikey=YOUR_API_KEY`) or as an attribute in the request body (`{ apikey: YOUR_API_KEY }`).
3888

3989
### Execution
4090

4191
Edge functions can be called via HTTP GET and POST methods. You can pass additional values to your edge function in two ways:
4292
- Query parameters: Accessible via `request.params`
4393
- Request body: Accessible via `request.data`
4494

45-
### Testing
46-
You may test the execution of edge functions by clicking the "Test" command.
47-
48-
You are not required to supply an API key when testing your edge function in the console. The function will run using the dashboard user privileges.
49-
50-
5195

5296
## Guides
5397
### Interacting with your Database

sqlite-cloud/platform/webhooks.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,21 @@ category: platform
55
status: publish
66
slug: webhooks
77
---
8+
import VideoPlayer from '@commons-components/Video/VideoPlayer.astro';
9+
import webhooksUrl from '@docs-website-assets/introduction/video/dashboard_webhooks_trigger_url.mp4';
10+
import webhooksEdgeFunction from '@docs-website-assets/introduction/video/dashboard_webhooks_trigger_edge_function.mp4.mp4';
811

912
**Webhooks** are HTTP callbacks that allow your applications to receive real-time notifications when specific events occur. In the context of SQLite Cloud, webhooks make it easy to build reactive systems by automatically sending notifications when data changes happen within your databases.
1013

1114
## Real-Time Notifications for Database Writes
1215

16+
1317
Use the **Webhooks panel** to effortlessly create real-time notifications for write operations—such as inserts, updates, or deletes—within your SQLite Cloud database.
1418

1519
For example, you can configure SQLite Cloud to notify a [webhook.site](https://webhook.site) endpoint every time a write operation occurs on the `albums` table of the `chinook.sqlite` database.
1620

17-
![Dashboard Projects](@docs-website-assets/introduction/dashboard_webhook_create.png)
21+
<VideoPlayer src={webhooksUrl} />
22+
1823

1924
## Change Data Capture
2025

@@ -29,7 +34,7 @@ This enables seamless integration with logging systems, monitoring dashboards, o
2934

3035
Upon creation, each webhook is assigned a **secret key** used to verify the authenticity of incoming requests.
3136

32-
![Dashboard Projects](@docs-website-assets/introduction/dashboard_webhook_create2.png)
37+
![Dashboard Projects](@docs-website-assets/introduction/dashboard_webhook_secret.png)
3338

3439
You can also manage and review all active webhooks from your project dashboard.
3540

@@ -41,5 +46,6 @@ Webhooks in SQLite Cloud aren't limited to data capture—they can also **trigge
4146

4247
* Via HTTP or WebSocket
4348
* In response to database write events
49+
<VideoPlayer src={webhooksEdgeFunction} />
4450

4551
This allows developers to build distributed, event-driven applications that react immediately to changes at the edge.

sqlite-cloud/write-data.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ slug: write-data
88
import VideoPlayer from '@commons-components/Video/VideoPlayer.astro';
99
import studioInsert from '@docs-website-assets/introduction/video/dashboard_studio.mp4';
1010

11-
1211
After you've created a database in SQLite Cloud, you can start writing data to it. You can write data to your cluster using the SQLite Cloud UI, API, or client libraries.
1312

1413
## Writing data with the SQLite Cloud UI
15-
Navigate to the console tab in the left-hand navigation. From here, you can run SQL commands against your cluster. Use the optional dropdown menus to select a database and table.
14+
Navigate to the Studio tab from the left-hand navigation. From here, you can run SQL commands directly on your cluster.
15+
If needed, use the dropdown menus to select the database and table where you want to insert or update data.
16+
17+
Alternatively, you can also interact directly with the table view to add new records or update existing ones without writing SQL manually.
18+
1619

1720
<VideoPlayer src={studioInsert} />
1821

0 commit comments

Comments
 (0)