-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathquery.sql.go
More file actions
54 lines (44 loc) · 1.37 KB
/
query.sql.go
File metadata and controls
54 lines (44 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.30.0
// source: query.sql
package querytest
import (
"context"
)
const groupConcat = `-- name: GroupConcat :one
SELECT group_concat(name order by id asc) FROM book
`
func (q *Queries) GroupConcat(ctx context.Context) (string, error) {
row := q.db.QueryRowContext(ctx, groupConcat)
var group_concat string
err := row.Scan(&group_concat)
return group_concat, err
}
const groupConcatDelimeter = `-- name: GroupConcatDelimeter :one
SELECT group_concat(name, ',' order by id asc) FROM book
`
func (q *Queries) GroupConcatDelimeter(ctx context.Context) (string, error) {
row := q.db.QueryRowContext(ctx, groupConcatDelimeter)
var group_concat string
err := row.Scan(&group_concat)
return group_concat, err
}
const groupConcatOne = `-- name: GroupConcatOne :one
SELECT group_concat(name order by id asc) FROM book
`
func (q *Queries) GroupConcatOne(ctx context.Context) (string, error) {
row := q.db.QueryRowContext(ctx, groupConcatOne)
var group_concat string
err := row.Scan(&group_concat)
return group_concat, err
}
const stringAgg = `-- name: StringAgg :one
SELECT string_agg(name, ',' order by id asc) FROM book
`
func (q *Queries) StringAgg(ctx context.Context) (interface{}, error) {
row := q.db.QueryRowContext(ctx, stringAgg)
var string_agg interface{}
err := row.Scan(&string_agg)
return string_agg, err
}