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

Method CreateAuthor

examples/booktest/postgresql/query.sql.go:104–109  ·  view source on GitHub ↗
(ctx context.Context, name string)

Source from the content-addressed store, hash-verified

102`
103
104func (q *Queries) CreateAuthor(ctx context.Context, name string) (Author, error) {
105 row := q.db.QueryRow(ctx, createAuthor, name)
106 var i Author
107 err := row.Scan(&i.AuthorID, &i.Name)
108 return i, err
109}
110
111const createBook = `-- name: CreateBook :one
112INSERT INTO books (

Callers

nothing calls this directly

Calls 2

QueryRowMethod · 0.65
ScanMethod · 0.45

Tested by

no test coverage detected