chore: import upstream snapshot with attribution
CI / compile_and_lint (push) Failing after 0s
CI / docker_build (linux/amd64, -linux-amd64-duckdb, duckdb) (push) Failing after 0s
CI / docker_build (linux/arm64, -linux-arm64, minimal) (push) Failing after 2s
CI / docker_build (linux/arm64, -linux-arm64-duckdb, duckdb) (push) Failing after 1s
CI / docker_build (linux/amd64, minimal) (push) Failing after 1s
CI / test (, sqlite, sqlite::memory:) (push) Has been skipped
CI / test (mssql, mssql, mssql://root:Password123!@127.0.0.1/sqlpage) (push) Has been skipped
CI / test (mysql, mysql, mysql://root:Password123!@127.0.0.1/sqlpage) (push) Has been skipped
CI / test (oracle, oracle, Driver=Oracle 21 ODBC driver;Dbq=//127.0.0.1:1521/FREEPDB1;Uid=root;Pwd=Password123!) (push) Has been skipped
CI / test (postgres, odbc, Driver=PostgreSQL Unicode;Server=127.0.0.1;Port=5432;Database=sqlpage;UID=root;PWD=Password123!, true) (push) Has been skipped
CI / test (postgres, postgres, postgres://root:Password123!@127.0.0.1/sqlpage) (push) Has been skipped
CI / playwright (push) Has been skipped
CI / docker_build (linux/arm/v7, -linux-arm-v7, minimal) (push) Failing after 0s
CI / hurl_examples (push) Failing after 8s
deploy website / deploy_official_site (push) Failing after 1s
CI / hurl (${{ matrix.example }}) (push) Has been skipped
CI / docker_push (duckdb) (push) Has been cancelled
CI / docker_push (minimal) (push) Has been cancelled
CI / windows_test (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 12:31:57 +08:00
commit d718c5a372
986 changed files with 74597 additions and 0 deletions
@@ -0,0 +1,10 @@
# Remote Content Demo
This small SQLPage example shows how to:
- lazy-load other page in cards including:
- chart component rendered by sqlpage
- map component rendered by sqlpage
- table component rendered by sqlpage
![remote content screenshot](screenshot.png)
@@ -0,0 +1,30 @@
select
'chart' as component,
'Quarterly Revenue' as title,
'area' as type,
'indigo' as color,
5 as marker,
TRUE as time;
select
'2022-01-01T00:00:00Z' as x,
15 as y;
select
'2022-04-01T00:00:00Z' as x,
46 as y;
select
'2022-07-01T00:00:00Z' as x,
23 as y;
select
'2022-10-01T00:00:00Z' as x,
70 as y;
select
'2023-01-01T00:00:00Z' as x,
35 as y;
select
'2023-04-01T00:00:00Z' as x,
106 as y;
select
'2023-07-01T00:00:00Z' as x,
53 as y;
@@ -0,0 +1,7 @@
services:
web:
image: lovasoa/sqlpage:main
ports:
- "8080:8080"
volumes:
- .:/var/www
@@ -0,0 +1,21 @@
select
'card' as component,
2 as columns;
select
'A card with a Markdown description' as title,
'This is a card with a **Markdown** description.
This is useful if you want to display a lot of text in the card, with many options for formatting, such as
- **bold**,
- *italics*,
- [links](index.sql),
- etc.' as description_md;
select
'A card with lazy-loaded chart' as title,
'/chart-example.sql?_sqlpage_embed' as embed;
select
'A card with lazy-loaded map' as title,
'/map-example.sql?_sqlpage_embed' as embed;
select
'A card with lazy-loaded table' as title,
'/table-example.sql?_sqlpage_embed' as embed;
@@ -0,0 +1,9 @@
select
'map' as component,
1 as zoom;
select
'New Delhi' as title,
28.6139 as latitude,
77.209 as longitude;
Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

@@ -0,0 +1,13 @@
select
'table' as component,
TRUE as sort,
TRUE as search;
select
'Ophir' as Forename,
'Lojkine' as Surname,
'lovasoa' as Pseudonym;
select
'Linus' as Forename,
'Torvalds' as Surname,
'torvalds' as Pseudonym;
@@ -0,0 +1,32 @@
GET http://localhost:8080/
HTTP 200
[Asserts]
xpath "count(//div[contains(@class, 'card')])" >= 4
body contains "A card with a Markdown description"
body contains "<strong>Markdown</strong>"
body htmlUnescape contains "/chart-example.sql?_sqlpage_embed"
body htmlUnescape contains "/map-example.sql?_sqlpage_embed"
body htmlUnescape contains "/table-example.sql?_sqlpage_embed"
body not contains "An error occurred"
GET http://localhost:8080/chart-example.sql?_sqlpage_embed
HTTP 200
[Asserts]
xpath "normalize-space(//*[contains(., 'Quarterly Revenue')])" contains "Quarterly Revenue"
body contains "2023-07-01T00:00:00Z"
body not contains "An error occurred"
GET http://localhost:8080/map-example.sql?_sqlpage_embed
HTTP 200
[Asserts]
body contains "New Delhi"
body contains "28.6139"
body not contains "An error occurred"
GET http://localhost:8080/table-example.sql?_sqlpage_embed
HTTP 200
[Asserts]
xpath "normalize-space(//*[contains(., 'Forename')])" contains "Forename"
body contains "Ophir"
body contains "Torvalds"
body not contains "An error occurred"