-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathquery.sql.go
More file actions
274 lines (224 loc) · 5.59 KB
/
query.sql.go
File metadata and controls
274 lines (224 loc) · 5.59 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.24.0
// source: query.sql
package querytest
import (
"context"
)
const abs = `-- name: Abs :one
SELECT abs(-17.4)
`
func (q *Queries) Abs(ctx context.Context) (int64, error) {
row := q.db.QueryRowContext(ctx, abs)
var abs int64
err := row.Scan(&abs)
return abs, err
}
const cbrt = `-- name: Cbrt :one
SELECT cbrt(27.0)
`
func (q *Queries) Cbrt(ctx context.Context) (float64, error) {
row := q.db.QueryRowContext(ctx, cbrt)
var cbrt float64
err := row.Scan(&cbrt)
return cbrt, err
}
const ceil = `-- name: Ceil :one
SELECT ceil(-42.8)
`
func (q *Queries) Ceil(ctx context.Context) (float64, error) {
row := q.db.QueryRowContext(ctx, ceil)
var ceil float64
err := row.Scan(&ceil)
return ceil, err
}
const ceiling = `-- name: Ceiling :one
SELECT ceiling(-95.3)
`
func (q *Queries) Ceiling(ctx context.Context) (float64, error) {
row := q.db.QueryRowContext(ctx, ceiling)
var ceiling float64
err := row.Scan(&ceiling)
return ceiling, err
}
const degrees = `-- name: Degrees :one
SELECT degrees(0.5)
`
func (q *Queries) Degrees(ctx context.Context) (float64, error) {
row := q.db.QueryRowContext(ctx, degrees)
var degrees float64
err := row.Scan(°rees)
return degrees, err
}
const div = `-- name: Div :one
SELECT div(9,4)
`
func (q *Queries) Div(ctx context.Context) (string, error) {
row := q.db.QueryRowContext(ctx, div)
var div string
err := row.Scan(&div)
return div, err
}
const exp = `-- name: Exp :one
SELECT exp(1.0)
`
func (q *Queries) Exp(ctx context.Context) (float64, error) {
row := q.db.QueryRowContext(ctx, exp)
var exp float64
err := row.Scan(&exp)
return exp, err
}
const floor = `-- name: Floor :one
SELECT floor(-42.8)
`
func (q *Queries) Floor(ctx context.Context) (float64, error) {
row := q.db.QueryRowContext(ctx, floor)
var floor float64
err := row.Scan(&floor)
return floor, err
}
const ln = `-- name: Ln :one
SELECT ln(2.0)
`
func (q *Queries) Ln(ctx context.Context) (float64, error) {
row := q.db.QueryRowContext(ctx, ln)
var ln float64
err := row.Scan(&ln)
return ln, err
}
const log = `-- name: Log :one
SELECT log(100.0)
`
func (q *Queries) Log(ctx context.Context) (float64, error) {
row := q.db.QueryRowContext(ctx, log)
var log float64
err := row.Scan(&log)
return log, err
}
const logs = `-- name: Logs :one
SELECT log(2.0, 64.0)
`
func (q *Queries) Logs(ctx context.Context) (string, error) {
row := q.db.QueryRowContext(ctx, logs)
var log string
err := row.Scan(&log)
return log, err
}
const mod = `-- name: Mod :one
SELECT mod(9,4)
`
func (q *Queries) Mod(ctx context.Context) (int64, error) {
row := q.db.QueryRowContext(ctx, mod)
var mod int64
err := row.Scan(&mod)
return mod, err
}
const pi = `-- name: Pi :one
SELECT pi()
`
func (q *Queries) Pi(ctx context.Context) (float64, error) {
row := q.db.QueryRowContext(ctx, pi)
var pi float64
err := row.Scan(&pi)
return pi, err
}
const power = `-- name: Power :one
SELECT power(9.0, 3.0)
`
func (q *Queries) Power(ctx context.Context) (float64, error) {
row := q.db.QueryRowContext(ctx, power)
var power float64
err := row.Scan(&power)
return power, err
}
const radians = `-- name: Radians :one
SELECT radians(45.0)
`
func (q *Queries) Radians(ctx context.Context) (float64, error) {
row := q.db.QueryRowContext(ctx, radians)
var radians float64
err := row.Scan(&radians)
return radians, err
}
const round = `-- name: Round :one
SELECT round(42.4)
`
func (q *Queries) Round(ctx context.Context) (float64, error) {
row := q.db.QueryRowContext(ctx, round)
var round float64
err := row.Scan(&round)
return round, err
}
const rounds = `-- name: Rounds :one
SELECT round(42.4382, 2)
`
func (q *Queries) Rounds(ctx context.Context) (string, error) {
row := q.db.QueryRowContext(ctx, rounds)
var round string
err := row.Scan(&round)
return round, err
}
const scale = `-- name: Scale :one
SELECT scale(8.41)
`
func (q *Queries) Scale(ctx context.Context) (int32, error) {
row := q.db.QueryRowContext(ctx, scale)
var scale int32
err := row.Scan(&scale)
return scale, err
}
const sign = `-- name: Sign :one
SELECT sign(-8.4)
`
func (q *Queries) Sign(ctx context.Context) (float64, error) {
row := q.db.QueryRowContext(ctx, sign)
var sign float64
err := row.Scan(&sign)
return sign, err
}
const sqrt = `-- name: Sqrt :one
SELECT sqrt(2.0)
`
func (q *Queries) Sqrt(ctx context.Context) (float64, error) {
row := q.db.QueryRowContext(ctx, sqrt)
var sqrt float64
err := row.Scan(&sqrt)
return sqrt, err
}
const trunc = `-- name: Trunc :one
SELECT trunc(42.8)
`
func (q *Queries) Trunc(ctx context.Context) (float64, error) {
row := q.db.QueryRowContext(ctx, trunc)
var trunc float64
err := row.Scan(&trunc)
return trunc, err
}
const truncs = `-- name: Truncs :one
SELECT trunc(42.4382, 2)
`
func (q *Queries) Truncs(ctx context.Context) (string, error) {
row := q.db.QueryRowContext(ctx, truncs)
var trunc string
err := row.Scan(&trunc)
return trunc, err
}
const widthBucketNumerics = `-- name: WidthBucketNumerics :one
SELECT width_bucket(5.35, 0.024, 10.06, 5)
`
func (q *Queries) WidthBucketNumerics(ctx context.Context) (int32, error) {
row := q.db.QueryRowContext(ctx, widthBucketNumerics)
var width_bucket int32
err := row.Scan(&width_bucket)
return width_bucket, err
}
const widthBucketTimestamps = `-- name: WidthBucketTimestamps :one
SELECT width_bucket(now(), array['yesterday', 'today', 'tomorrow']::timestamptz[])
`
func (q *Queries) WidthBucketTimestamps(ctx context.Context) (int32, error) {
row := q.db.QueryRowContext(ctx, widthBucketTimestamps)
var width_bucket int32
err := row.Scan(&width_bucket)
return width_bucket, err
}