MCPcopy
hub / github.com/sqlc-dev/sqlc / WithAs

Method WithAs

internal/endtoend/testdata/column_as/mysql/go/query.sql.go:21–26  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

19}
20
21func (q *Queries) WithAs(ctx context.Context) (WithAsRow, error) {
22 row := q.db.QueryRowContext(ctx, withAs)
23 var i WithAsRow
24 err := row.Scan(&i.X, &i.Y)
25 return i, err
26}
27
28const withoutAs = `-- name: WithoutAs :one
29SELECT 1 x, 2 y

Callers

nothing calls this directly

Calls 2

QueryRowContextMethod · 0.65
ScanMethod · 0.45

Tested by

no test coverage detected