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