SET ":link" = COALESCE(:link, 'https://shandan.one/'||:tool);
SELECT 'text' AS component
, '
' AS html
;
SELECT 'dynamic' AS component, sqlpage.run_sql('sqlpage/QR.sql') AS properties
WHERE COALESCE (:hash, '') = '';
SET ":inner" = CASE COALESCE(:hash, '')
WHEN '' THEN :tool||'/form.sql'
ELSE 'sqlpage/validate.sql'
END;
SELECT 'dynamic' AS component, sqlpage.run_sql(:inner) AS properties;