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 76b14ec commit 0bf0d4bCopy full SHA for 0bf0d4b
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