hiling_go/db/queries/locations.sql

18 lines
284 B
MySQL
Raw Permalink Normal View History

2023-09-13 21:42:04 +07:00
-- name: GetListLocations :many
2023-09-14 13:49:03 +07:00
SELECT * FROM locations;
2023-09-13 21:42:04 +07:00
2023-09-20 13:37:14 +07:00
-- name: GetLocationTag :many
SELECT
name
FROM tags
WHERE tags_type = 'location'
AND
target_id = $1
AND
2023-10-03 19:44:31 +07:00
approved_by IS NOT NULL;
-- name: UpdateLocationThumbnail :exec
UPDATE locations
SET thumbnail = $1
WHERE id = $2;