all repos — homestead @ cde569513cdb91e6f605c4240924d12f7e5d031a

Code for my website

use treefmt-nix to format everything

Alan Pearce
commit

cde569513cdb91e6f605c4240924d12f7e5d031a

parent

bab78381a9c54b809dc76144aa9f773d387bb621

1 file changed, 20 insertions(+), 18 deletions(-)

changed files
M shared/storage/sqlite/db/query.sql.goshared/storage/sqlite/db/query.sql.go
@@ -11,11 +11,11 @@ )
const checkPath = `-- name: CheckPath :one SELECT - EXISTS( - SELECT 1 - FROM url - WHERE path = ? - ) AS differs + EXISTS( + SELECT 1 + FROM url + WHERE path = ? + ) AS differs ` func (q *Queries) CheckPath(ctx context.Context, path string) (int64, error) {
@@ -27,15 +27,15 @@ }
const getFile = `-- name: GetFile :many SELECT - file.file_id, file.url_id, file.content_type, file.last_modified, file.title, file.etag, file.style_hash, file.headers, - content.content_id, content.file_id, content.encoding, content.body + file.file_id, file.url_id, file.content_type, file.last_modified, file.title, file.etag, file.style_hash, file.headers, + content.content_id, content.file_id, content.encoding, content.body FROM url INNER JOIN file - USING (url_id) + USING (url_id) INNER JOIN content - USING (file_id) + USING (file_id) WHERE - url.path = ? + url.path = ? ` type GetFileRow struct {
@@ -96,15 +96,17 @@ return err
} const insertFile = `-- name: InsertFile :execlastid -INSERT INTO file (url_id, content_type, last_modified, etag, style_hash, title, headers) +INSERT INTO file ( + url_id, content_type, last_modified, etag, style_hash, title, headers +) VALUES ( - ?1, - ?2, - ?3, - ?4, - ?5, - ?6, - ?7 + ?1, + ?2, + ?3, + ?4, + ?5, + ?6, + ?7 ) `