forked from sqlc-dev/sqlc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquery.sql.go
More file actions
45 lines (40 loc) · 739 Bytes
/
query.sql.go
File metadata and controls
45 lines (40 loc) · 739 Bytes
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
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.19.1
// source: query.sql
package querytest
import (
"context"
"database/sql"
)
const deleteAuthor = `-- name: DeleteAuthor :exec
DELETE FROM
books AS b
WHERE
b.author NOT IN (
SELECT
a.name
FROM
authors a
WHERE
a.age >= ?
)
AND b.translator NOT IN (
SELECT
t.name
FROM
translators t
WHERE
t.age >= ?
)
AND b.year <= ?
`
type DeleteAuthorParams struct {
Age sql.NullInt64
Age_2 sql.NullInt64
Year sql.NullInt64
}
func (q *Queries) DeleteAuthor(ctx context.Context, arg DeleteAuthorParams) error {
_, err := q.db.ExecContext(ctx, deleteAuthor, arg.Age, arg.Age_2, arg.Year)
return err
}