-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathquery.sql.go
More file actions
71 lines (58 loc) · 1.57 KB
/
query.sql.go
File metadata and controls
71 lines (58 loc) · 1.57 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.30.0
// source: query.sql
package db
import (
"context"
)
const selectFalse = `-- name: SelectFalse :one
SELECT false
`
func (q *Queries) SelectFalse(ctx context.Context) (bool, error) {
row := q.db.QueryRowContext(ctx, selectFalse)
var column_1 bool
err := row.Scan(&column_1)
return column_1, err
}
const selectMultipleBooleans = `-- name: SelectMultipleBooleans :one
SELECT true AS col_a, false AS col_b, true AS col_c
`
type SelectMultipleBooleansRow struct {
ColA bool
ColB bool
ColC bool
}
func (q *Queries) SelectMultipleBooleans(ctx context.Context) (SelectMultipleBooleansRow, error) {
row := q.db.QueryRowContext(ctx, selectMultipleBooleans)
var i SelectMultipleBooleansRow
err := row.Scan(&i.ColA, &i.ColB, &i.ColC)
return i, err
}
const selectOne = `-- name: SelectOne :one
SELECT 1
`
func (q *Queries) SelectOne(ctx context.Context) (int64, error) {
row := q.db.QueryRowContext(ctx, selectOne)
var column_1 int64
err := row.Scan(&column_1)
return column_1, err
}
const selectTrue = `-- name: SelectTrue :one
SELECT true
`
func (q *Queries) SelectTrue(ctx context.Context) (bool, error) {
row := q.db.QueryRowContext(ctx, selectTrue)
var column_1 bool
err := row.Scan(&column_1)
return column_1, err
}
const selectTrueWithAlias = `-- name: SelectTrueWithAlias :one
SELECT true AS is_active
`
func (q *Queries) SelectTrueWithAlias(ctx context.Context) (bool, error) {
row := q.db.QueryRowContext(ctx, selectTrueWithAlias)
var is_active bool
err := row.Scan(&is_active)
return is_active, err
}