/
githubmirror
/
sqlc
Обзор
Документация
Войти
/
githubmirror
/
sqlc
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
internal/endtoend/testdata/column_as/postgresql/stdlib/go/query.sql.go
42 строки
709 B
Kyle Gray
Release 1.31.1 (#4407)
22 апр 2026, 17:52
Не верифицирован
22 апр 2026, 17:52
a95e91d
Код
Авторство
О чём код?
// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.31.1 // source: query.sql package querytest import ( "context" ) const withAs = `-- name: WithAs :one SELECT 1 AS x, 2 AS y ` type WithAsRow struct { X int32 Y int32 } func (q *Queries) WithAs(ctx context.Context) (WithAsRow, error) { row := q.db.QueryRowContext(ctx, withAs) var i WithAsRow err := row.Scan(&i.X, &i.Y) return i, err } const withoutAs = `-- name: WithoutAs :one SELECT 1 x, 2 y ` type WithoutAsRow struct { X int32 Y int32 } func (q *Queries) WithoutAs(ctx context.Context) (WithoutAsRow, error) { row := q.db.QueryRowContext(ctx, withoutAs) var i WithoutAsRow err := row.Scan(&i.X, &i.Y) return i, err }