improve existing examples for sqlpage 0.7.2
This commit is contained in:
@@ -2,9 +2,7 @@ SELECT 'shell' AS component, 'User Management App' AS title, 'user' AS icon, '/'
|
||||
|
||||
SELECT 'form' AS component,
|
||||
'Edit user' AS title,
|
||||
CASE WHEN $id IS NULL THEN 'insert_user.sql'
|
||||
ELSE 'update_user.sql?id=' || $id
|
||||
END AS action;
|
||||
'insert_user.sql' || COALESCE('?id=' || $id, '') AS action;
|
||||
|
||||
SELECT 'First name' AS name,
|
||||
TRUE AS required,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
INSERT INTO address (user_id, street, city, country) VALUES ($user_id, :Street, :City, :Country)
|
||||
RETURNING
|
||||
'http_header' AS component,
|
||||
'edit_user.sql?id=' || user_id AS location;
|
||||
'redirect' AS component,
|
||||
'edit_user.sql?id=' || user_id AS link;
|
||||
@@ -1,5 +1,5 @@
|
||||
INSERT INTO user (id, first_name, last_name, email) VALUES ($id, :"First name", :"Last name", :Email)
|
||||
ON CONFLICT (id) DO UPDATE SET first_name = excluded.first_name, last_name = excluded.last_name, email = excluded.email
|
||||
RETURNING
|
||||
'http_header' AS component,
|
||||
'edit_user.sql?id=' || id AS location;
|
||||
'redirect' AS component,
|
||||
'edit_user.sql?id=' || id AS link;
|
||||
@@ -1,2 +1 @@
|
||||
SELECT 'http_header' as component,
|
||||
'get started.sql' as location;
|
||||
SELECT 'redirect' as component, 'get started.sql' as link;
|
||||
@@ -1,2 +1 @@
|
||||
SELECT 'http_header' as component,
|
||||
'get started.sql' as location;
|
||||
SELECT 'redirect' as component, 'get started.sql' as link;
|
||||
@@ -3,4 +3,4 @@ SELECT 'cookie' as component,
|
||||
'username' as name,
|
||||
TRUE as remove;
|
||||
|
||||
SELECT 'http_header' as component, 'index.sql' as Location;
|
||||
SELECT 'redirect' as component, 'index.sql' as link;
|
||||
Reference in New Issue
Block a user