add a semi-colon to the end of all statements

This commit is contained in:
Izalia Mae 2024-02-14 12:29:56 -05:00
parent 101c668173
commit a644900417

View file

@ -76,7 +76,7 @@ WHERE code = :code;
-- name: del-token-user -- name: del-token-user
DELETE FROM tokens DELETE FROM tokens
WHERE user = :username WHERE user = :username;
-- name: get-software-ban -- name: get-software-ban
@ -91,37 +91,37 @@ RETURNING *;
-- name: del-software-ban -- name: del-software-ban
DELETE FROM software_bans DELETE FROM software_bans
WHERE name = :name WHERE name = :name;
-- name: get-domain-ban -- name: get-domain-ban
SELECT * FROM domain_bans WHERE domain = :domain SELECT * FROM domain_bans WHERE domain = :domain;
-- name: put-domain-ban -- name: put-domain-ban
INSERT INTO domain_bans (domain, reason, note, created) INSERT INTO domain_bans (domain, reason, note, created)
VALUES (:domain, :reason, :note, :created) VALUES (:domain, :reason, :note, :created)
RETURNING * RETURNING *;
-- name: del-domain-ban -- name: del-domain-ban
DELETE FROM domain_bans DELETE FROM domain_bans
WHERE domain = :domain WHERE domain = :domain;
-- name: get-domain-whitelist -- name: get-domain-whitelist
SELECT * FROM whitelist WHERE domain = :domain SELECT * FROM whitelist WHERE domain = :domain;
-- name: put-domain-whitelist -- name: put-domain-whitelist
INSERT INTO whitelist (domain, created) INSERT INTO whitelist (domain, created)
VALUES (:domain, :created) VALUES (:domain, :created)
RETURNING * RETURNING *;
-- name: del-domain-whitelist -- name: del-domain-whitelist
DELETE FROM whitelist DELETE FROM whitelist
WHERE domain = :domain WHERE domain = :domain;
-- cache functions -- -- cache functions --
@ -135,7 +135,7 @@ CREATE TABLE IF NOT EXISTS cache (
type TEXT DEFAULT 'str', type TEXT DEFAULT 'str',
updated TIMESTAMP NOT NULL, updated TIMESTAMP NOT NULL,
UNIQUE(namespace, key) UNIQUE(namespace, key)
) );
-- name: create-cache-table-postgres -- name: create-cache-table-postgres
CREATE TABLE IF NOT EXISTS cache ( CREATE TABLE IF NOT EXISTS cache (
@ -146,21 +146,21 @@ CREATE TABLE IF NOT EXISTS cache (
type TEXT DEFAULT 'str', type TEXT DEFAULT 'str',
updated TIMESTAMP NOT NULL, updated TIMESTAMP NOT NULL,
UNIQUE(namespace, key) UNIQUE(namespace, key)
) );
-- name: get-cache-item -- name: get-cache-item
SELECT * FROM cache SELECT * FROM cache
WHERE namespace = :namespace and key = :key WHERE namespace = :namespace and key = :key;
-- name: get-cache-keys -- name: get-cache-keys
SELECT key FROM cache SELECT key FROM cache
WHERE namespace = :namespace WHERE namespace = :namespace;
-- name: get-cache-namespaces -- name: get-cache-namespaces
SELECT DISTINCT namespace FROM cache SELECT DISTINCT namespace FROM cache;
-- name: set-cache-item -- name: set-cache-item
@ -168,18 +168,18 @@ INSERT INTO cache (namespace, key, value, type, updated)
VALUES (:namespace, :key, :value, :type, :date) VALUES (:namespace, :key, :value, :type, :date)
ON CONFLICT (namespace, key) DO ON CONFLICT (namespace, key) DO
UPDATE SET value = :value, type = :type, updated = :date UPDATE SET value = :value, type = :type, updated = :date
RETURNING * RETURNING *;
-- name: del-cache-item -- name: del-cache-item
DELETE FROM cache DELETE FROM cache
WHERE namespace = :namespace and key = :key WHERE namespace = :namespace and key = :key;
-- name: del-cache-namespace -- name: del-cache-namespace
DELETE FROM cache DELETE FROM cache
WHERE namespace = :namespace WHERE namespace = :namespace;
-- name: del-cache-all -- name: del-cache-all
DELETE FROM cache DELETE FROM cache;