You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
paopao-ce/internal/dao/slonik/ce/postgres/query/city.sql

27 lines
413 B

-- name: ListCities :many
SELECT *
FROM city
ORDER BY name;
-- name: GetCity :one
SELECT *
FROM city
WHERE slug = $1;
-- name: CreateCity :one
-- Create a new city. The slug must be unique.
-- This is the second line of the comment
-- This is the third line
INSERT INTO city (
name,
slug
) VALUES (
$1,
$2
) RETURNING *;
-- name: UpdateCityName :exec
UPDATE city
SET name = $2
WHERE slug = $1;