This commit is contained in:
oneao committed 2026-01-13 22:18:01 +08:00
1 parent 6277fb2f9e
commit 8ecac0d7dd
270 files changed
+40438 -529

No files matched your search

+47
View File
@@ -0,0 +1,47 @@
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.30.0
// source: copyfrom.go
package repo
import (
"context"
)
// iteratorForBatchInsertMoneyUserCategories implements pgx.CopyFromSource.
type iteratorForBatchInsertMoneyUserCategories struct {
rows []BatchInsertMoneyUserCategoriesParams
skippedFirstNextCall bool
}
func (r *iteratorForBatchInsertMoneyUserCategories) 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 iteratorForBatchInsertMoneyUserCategories) Values() ([]interface{}, error) {
return []interface{}{
r.rows[0].ID,
r.rows[0].UserID,
r.rows[0].Name,
r.rows[0].Icon,
r.rows[0].Type,
r.rows[0].SortNumber,
}, nil
}
func (r iteratorForBatchInsertMoneyUserCategories) Err() error {
return nil
}
func (q *Queries) BatchInsertMoneyUserCategories(ctx context.Context, arg []BatchInsertMoneyUserCategoriesParams) (int64, error) {
return q.db.CopyFrom(ctx, []string{"money_user_category"}, []string{"id", "user_id", "name", "icon", "type", "sort_number"}, &iteratorForBatchInsertMoneyUserCategories{rows: arg})
}