-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathcopyfrom.go
More file actions
43 lines (36 loc) · 946 Bytes
/
copyfrom.go
File metadata and controls
43 lines (36 loc) · 946 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
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.22.0
// source: copyfrom.go
package querytest
import (
"context"
)
// iteratorForStageUserData implements pgx.CopyFromSource.
type iteratorForStageUserData struct {
rows []StageUserDataParams
skippedFirstNextCall bool
}
func (r *iteratorForStageUserData) Next() bool {
if len(r.rows) == 0 {
return false
}
if !r.skippedFirstNextCall {
r.skippedFirstNextCall = true
return true
}
r.rows = r.rows[1:]
return len(r.rows) > 0
}
func (r iteratorForStageUserData) Values() ([]interface{}, error) {
return []interface{}{
r.rows[0].IDParam,
r.rows[0].UserParam,
}, nil
}
func (r iteratorForStageUserData) Err() error {
return nil
}
func (q *Queries) StageUserData(ctx context.Context, arg []StageUserDataParams) (int64, error) {
return q.db.CopyFrom(ctx, []string{"user_data"}, []string{"id", "user"}, &iteratorForStageUserData{rows: arg})
}