CREATE TABLE IF NOT EXISTS t (i INTEGER PRIMARY KEY, a TEXT); INSERT INTO t (a) SELECT :A WHERE $e IS NULL AND :A IS NOT NULL; UPDATE t SET a = :A WHERE i = $e AND :A IS NOT NULL; DELETE FROM t WHERE i = $d; SELECT 'button' AS component; SELECT '?' AS link, 'New' AS title; SELECT 'form' AS component; SELECT (SELECT a FROM t WHERE i = $e) AS value, 'A' AS name; SELECT 'table' AS component, '' AS markdown, 'X' AS markdown, TRUE AS sort; SELECT a AS A, i AS I, '[edit](?e='||i||')' AS '', '[x](?d='||i||')' AS X FROM t;