MCPcopy Index your code
hub / github.com/sqlc-dev/sqlc / GetAuthor

Method GetAuthor

examples/booktest/postgresql/query.sql.go:181–186  ·  view source on GitHub ↗
(ctx context.Context, authorID int32)

Source from the content-addressed store, hash-verified

179`
180
181func (q *Queries) GetAuthor(ctx context.Context, authorID int32) (Author, error) {
182 row := q.db.QueryRow(ctx, getAuthor, authorID)
183 var i Author
184 err := row.Scan(&i.AuthorID, &i.Name)
185 return i, err
186}
187
188const getBook = `-- name: GetBook :one
189SELECT book_id, author_id, isbn, book_type, title, year, available, tags FROM books

Callers

nothing calls this directly

Calls 2

QueryRowMethod · 0.65
ScanMethod · 0.45

Tested by

no test coverage detected