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

Method CreateAuthor

examples/booktest/sqlite/query.sql.go:121–126  ·  view source on GitHub ↗
(ctx context.Context, name string)

Source from the content-addressed store, hash-verified

119`
120
121func (q *Queries) CreateAuthor(ctx context.Context, name string) (Author, error) {
122 row := q.db.QueryRowContext(ctx, createAuthor, name)
123 var i Author
124 err := row.Scan(&i.AuthorID, &i.Name)
125 return i, err
126}
127
128const createBook = `-- name: CreateBook :one
129INSERT INTO books (

Callers

nothing calls this directly

Calls 2

QueryRowContextMethod · 0.65
ScanMethod · 0.45

Tested by

no test coverage detected