18 lines
284 B
SQL
Executable File
18 lines
284 B
SQL
Executable File
-- name: GetListLocations :many
|
|
SELECT * FROM locations;
|
|
|
|
-- name: GetLocationTag :many
|
|
SELECT
|
|
name
|
|
FROM tags
|
|
WHERE tags_type = 'location'
|
|
AND
|
|
target_id = $1
|
|
AND
|
|
approved_by IS NOT NULL;
|
|
|
|
|
|
-- name: UpdateLocationThumbnail :exec
|
|
UPDATE locations
|
|
SET thumbnail = $1
|
|
WHERE id = $2; |