snapshot of https://github.com/sqlc-dev/sqlc.git (main, 2026-09-16; blobs > 131072B omitted)
Some checks failed
kotlin / test (push) Has been skipped
python / test (push) Has been skipped
typescript / test (push) Has been skipped
go / build darwin/amd64 (push) Has been cancelled
go / build linux/amd64 (push) Has been cancelled
go / build windows/amd64 (push) Has been cancelled
go / build darwin/arm64 (push) Has been cancelled
go / build linux/arm64 (push) Has been cancelled
go / build windows/arm64 (push) Has been cancelled
go / test (push) Has been cancelled
go / vuln_check (push) Has been cancelled
Some checks failed
kotlin / test (push) Has been skipped
python / test (push) Has been skipped
typescript / test (push) Has been skipped
go / build darwin/amd64 (push) Has been cancelled
go / build linux/amd64 (push) Has been cancelled
go / build windows/amd64 (push) Has been cancelled
go / build darwin/arm64 (push) Has been cancelled
go / build linux/arm64 (push) Has been cancelled
go / build windows/arm64 (push) Has been cancelled
go / test (push) Has been cancelled
go / vuln_check (push) Has been cancelled
This commit is contained in:
165
internal/endtoend/testdata/builtins/sqlite/go/aggfunc.sql.go
vendored
Normal file
165
internal/endtoend/testdata/builtins/sqlite/go/aggfunc.sql.go
vendored
Normal file
@@ -0,0 +1,165 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.31.1
|
||||
// source: aggfunc.sql
|
||||
|
||||
package querytest
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
)
|
||||
|
||||
const getAvg = `-- name: GetAvg :one
|
||||
SELECT avg(int_val) FROM test
|
||||
`
|
||||
|
||||
func (q *Queries) GetAvg(ctx context.Context) (sql.NullFloat64, error) {
|
||||
row := q.db.QueryRowContext(ctx, getAvg)
|
||||
var avg sql.NullFloat64
|
||||
err := row.Scan(&avg)
|
||||
return avg, err
|
||||
}
|
||||
|
||||
const getCount = `-- name: GetCount :one
|
||||
SELECT count(*) FROM test
|
||||
`
|
||||
|
||||
func (q *Queries) GetCount(ctx context.Context) (int64, error) {
|
||||
row := q.db.QueryRowContext(ctx, getCount)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const getCountId = `-- name: GetCountId :one
|
||||
SELECT count(id) FROM test
|
||||
`
|
||||
|
||||
func (q *Queries) GetCountId(ctx context.Context) (int64, error) {
|
||||
row := q.db.QueryRowContext(ctx, getCountId)
|
||||
var count int64
|
||||
err := row.Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
const getGroupConcatInt = `-- name: GetGroupConcatInt :one
|
||||
SELECT group_concat(int_val) FROM test
|
||||
`
|
||||
|
||||
func (q *Queries) GetGroupConcatInt(ctx context.Context) (sql.NullString, error) {
|
||||
row := q.db.QueryRowContext(ctx, getGroupConcatInt)
|
||||
var group_concat sql.NullString
|
||||
err := row.Scan(&group_concat)
|
||||
return group_concat, err
|
||||
}
|
||||
|
||||
const getGroupConcatInt2 = `-- name: GetGroupConcatInt2 :one
|
||||
SELECT group_concat(1, ':') FROM test
|
||||
`
|
||||
|
||||
func (q *Queries) GetGroupConcatInt2(ctx context.Context) (sql.NullString, error) {
|
||||
row := q.db.QueryRowContext(ctx, getGroupConcatInt2)
|
||||
var group_concat sql.NullString
|
||||
err := row.Scan(&group_concat)
|
||||
return group_concat, err
|
||||
}
|
||||
|
||||
const getGroupConcatText = `-- name: GetGroupConcatText :one
|
||||
SELECT group_concat(text_val) FROM test
|
||||
`
|
||||
|
||||
func (q *Queries) GetGroupConcatText(ctx context.Context) (sql.NullString, error) {
|
||||
row := q.db.QueryRowContext(ctx, getGroupConcatText)
|
||||
var group_concat sql.NullString
|
||||
err := row.Scan(&group_concat)
|
||||
return group_concat, err
|
||||
}
|
||||
|
||||
const getGroupConcatText2 = `-- name: GetGroupConcatText2 :one
|
||||
SELECT group_concat(text_val, ':') FROM test
|
||||
`
|
||||
|
||||
func (q *Queries) GetGroupConcatText2(ctx context.Context) (sql.NullString, error) {
|
||||
row := q.db.QueryRowContext(ctx, getGroupConcatText2)
|
||||
var group_concat sql.NullString
|
||||
err := row.Scan(&group_concat)
|
||||
return group_concat, err
|
||||
}
|
||||
|
||||
const getMaxInt = `-- name: GetMaxInt :one
|
||||
SELECT max(int_val) FROM test
|
||||
`
|
||||
|
||||
func (q *Queries) GetMaxInt(ctx context.Context) (any, error) {
|
||||
row := q.db.QueryRowContext(ctx, getMaxInt)
|
||||
var max any
|
||||
err := row.Scan(&max)
|
||||
return max, err
|
||||
}
|
||||
|
||||
const getMaxText = `-- name: GetMaxText :one
|
||||
SELECT max(text_val) FROM test
|
||||
`
|
||||
|
||||
func (q *Queries) GetMaxText(ctx context.Context) (any, error) {
|
||||
row := q.db.QueryRowContext(ctx, getMaxText)
|
||||
var max any
|
||||
err := row.Scan(&max)
|
||||
return max, err
|
||||
}
|
||||
|
||||
const getMinInt = `-- name: GetMinInt :one
|
||||
SELECT min(int_val) FROM test
|
||||
`
|
||||
|
||||
func (q *Queries) GetMinInt(ctx context.Context) (any, error) {
|
||||
row := q.db.QueryRowContext(ctx, getMinInt)
|
||||
var min any
|
||||
err := row.Scan(&min)
|
||||
return min, err
|
||||
}
|
||||
|
||||
const getMinText = `-- name: GetMinText :one
|
||||
SELECT min(text_val) FROM test
|
||||
`
|
||||
|
||||
func (q *Queries) GetMinText(ctx context.Context) (any, error) {
|
||||
row := q.db.QueryRowContext(ctx, getMinText)
|
||||
var min any
|
||||
err := row.Scan(&min)
|
||||
return min, err
|
||||
}
|
||||
|
||||
const getSumInt = `-- name: GetSumInt :one
|
||||
SELECT sum(int_val) FROM test
|
||||
`
|
||||
|
||||
func (q *Queries) GetSumInt(ctx context.Context) (sql.NullFloat64, error) {
|
||||
row := q.db.QueryRowContext(ctx, getSumInt)
|
||||
var sum sql.NullFloat64
|
||||
err := row.Scan(&sum)
|
||||
return sum, err
|
||||
}
|
||||
|
||||
const getSumText = `-- name: GetSumText :one
|
||||
SELECT sum(text_val) FROM test
|
||||
`
|
||||
|
||||
func (q *Queries) GetSumText(ctx context.Context) (sql.NullFloat64, error) {
|
||||
row := q.db.QueryRowContext(ctx, getSumText)
|
||||
var sum sql.NullFloat64
|
||||
err := row.Scan(&sum)
|
||||
return sum, err
|
||||
}
|
||||
|
||||
const getTotalInt = `-- name: GetTotalInt :one
|
||||
SELECT total(int_val) FROM test
|
||||
`
|
||||
|
||||
func (q *Queries) GetTotalInt(ctx context.Context) (float64, error) {
|
||||
row := q.db.QueryRowContext(ctx, getTotalInt)
|
||||
var total float64
|
||||
err := row.Scan(&total)
|
||||
return total, err
|
||||
}
|
||||
Reference in New Issue
Block a user