1
0

query.sql 299 B

123456789101112131415161718
  1. /* name: GetAuthor :one */
  2. SELECT * FROM authors
  3. WHERE id = ? LIMIT 1;
  4. /* name: ListAuthors :many */
  5. SELECT * FROM authors
  6. ORDER BY name;
  7. /* name: CreateAuthor :execresult */
  8. INSERT INTO authors (
  9. name, bio
  10. ) VALUES (
  11. ?, ?
  12. );
  13. /* name: DeleteAuthor :exec */
  14. DELETE FROM authors
  15. WHERE id = ?;