city.sql 296 B

1234567891011121314151617181920212223
  1. /* name: ListCities :many */
  2. SELECT *
  3. FROM city
  4. ORDER BY name;
  5. /* name: GetCity :one */
  6. SELECT *
  7. FROM city
  8. WHERE slug = ?;
  9. /* name: CreateCity :exec */
  10. INSERT INTO city (
  11. name,
  12. slug
  13. ) VALUES (
  14. ?,
  15. ?
  16. );
  17. /* name: UpdateCityName :exec */
  18. UPDATE city
  19. SET name = ?
  20. WHERE slug = ?;