Skip to content

Commit

Permalink
test: add GetAuthorWithFirstBook in batch example
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragon-Huang0403 committed Jun 8, 2024
1 parent 76b14ec commit 0bf0d4b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/batch/postgresql/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,9 @@ WHERE book_id = $3;
-- name: GetBiography :batchone
SELECT biography FROM authors
WHERE author_id = $1;

-- name: GetAuthorWithFirstBook :batchone
SELECT sqlc.embed (books), sqlc.embed (authors)
FROM authors
INNER JOIN books ON authors.author_id = books.author_id
WHERE authors.author_id = $1;

0 comments on commit 0bf0d4b

Please sign in to comment.