// Code generated by sqlc. DO NOT EDIT. // versions: // sqlc v1.31.1 // source: copyfrom.go package store import ( "context" ) // iteratorForInsertRecoveryCodes implements pgx.CopyFromSource. type iteratorForInsertRecoveryCodes struct { rows []InsertRecoveryCodesParams skippedFirstNextCall bool } func (r *iteratorForInsertRecoveryCodes) 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 iteratorForInsertRecoveryCodes) Values() ([]interface{}, error) { return []interface{}{ r.rows[0].UserID, r.rows[0].CodeHash, }, nil } func (r iteratorForInsertRecoveryCodes) Err() error { return nil } func (q *Queries) InsertRecoveryCodes(ctx context.Context, arg []InsertRecoveryCodesParams) (int64, error) { return q.db.CopyFrom(ctx, []string{"recovery_codes"}, []string{"user_id", "code_hash"}, &iteratorForInsertRecoveryCodes{rows: arg}) }