Something went wrong. Try again.
a printing press for printing new golang projects
Something went wrong. Try again.
12345678910111213141516171819202122232425262728-- name: GetCountById :oneSELECT *FROM countsWHERE id = ?;
-- name: CreateCount :oneINSERT INTO counts ( curr) VALUES ( ?)RETURNING *;
-- name: IncrementCount :execUPDATE counts SET curr = curr + 1WHERE id = ?;
-- name: GetOrCreateCount :oneINSERT INTO counts ( id, curr) VALUES ( ?, 0)ON CONFLICT (id) DO UPDATESET id = excluded.idRETURNING *;