We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
GetAuthorWithFirstBook
1 parent 0b952b4 commit 46ffd02Copy full SHA for 46ffd02
examples/batch/postgresql/query.sql
@@ -54,3 +54,9 @@ WHERE book_id = $3;
54
-- name: GetBiography :batchone
55
SELECT biography FROM authors
56
WHERE author_id = $1;
57
+
58
+-- name: GetAuthorWithFirstBook :batchone
59
+SELECT sqlc.embed (books), sqlc.embed (authors)
60
+FROM authors
61
+INNER JOIN books ON authors.author_id = books.author_id
62
+WHERE authors.author_id = $1;
0 commit comments