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
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:
@@ -0,0 +1 @@
|
||||
sqlpage.bin
|
||||
@@ -0,0 +1,4 @@
|
||||
FROM lovasoa/sqlpage:main
|
||||
|
||||
COPY sqlpage /etc/sqlpage
|
||||
COPY . /var/www/
|
||||
@@ -0,0 +1,8 @@
|
||||
# Tiny Tweeter
|
||||
|
||||
This is a simple example of a very simple Twitter-like application running on top of PostgreSQL.
|
||||
It is called tweeter because Elon Musk already has the Twitter trademark, even though he doesn't use it.
|
||||
|
||||
It was presented at the [2023 PGConf.EU](https://2023.pgconf.eu/) conference.
|
||||
|
||||
You can find the slides at https://sql-page.com/pgconf/pgconf-2023.html.
|
||||
@@ -0,0 +1,14 @@
|
||||
services:
|
||||
sqlpage:
|
||||
build: .
|
||||
ports: ["8080:8080"]
|
||||
volumes: [".:/var/www"]
|
||||
depends_on: [postgres]
|
||||
environment:
|
||||
- DATABASE_URL=postgres://root:root@postgres/sqlpage
|
||||
postgres:
|
||||
image: postgres:18
|
||||
environment:
|
||||
- POSTGRES_USER=root
|
||||
- POSTGRES_PASSWORD=root
|
||||
- POSTGRES_DB=sqlpage
|
||||
@@ -0,0 +1,22 @@
|
||||
select 'shell' as component,
|
||||
'TinyTweeter' as title;
|
||||
|
||||
select 'form' as component,
|
||||
'Tweet' as validate;
|
||||
select 'new_tweet' as name,
|
||||
'Your story' as label,
|
||||
'textarea' as type,
|
||||
'Tell me your story...' as placeholder;
|
||||
select 'checkbox' as type,
|
||||
'Terms and conditions' as label,
|
||||
true as required;
|
||||
|
||||
insert into tweets (tweet)
|
||||
select :new_tweet
|
||||
where :new_tweet is not null;
|
||||
|
||||
select 'card' as component,
|
||||
'Tweets' as title,
|
||||
1 as columns;
|
||||
select tweet as description
|
||||
from tweets;
|
||||
@@ -0,0 +1,4 @@
|
||||
CREATE TABLE tweets(
|
||||
id bigserial,
|
||||
tweet text
|
||||
);
|
||||
@@ -0,0 +1,16 @@
|
||||
GET http://localhost:8080
|
||||
HTTP 200
|
||||
[Asserts]
|
||||
body contains "TinyTweeter"
|
||||
body contains "Tell me your story..."
|
||||
body contains "Terms and conditions"
|
||||
body not contains "An error occurred"
|
||||
|
||||
POST http://localhost:8080
|
||||
[FormParams]
|
||||
new_tweet: Hurl tiny twitter post
|
||||
HTTP 200
|
||||
[Asserts]
|
||||
body contains "TinyTweeter"
|
||||
body contains "Hurl tiny twitter post"
|
||||
body not contains "An error occurred"
|
||||
Reference in New Issue
Block a user