chore: initial commit
This commit is contained in:
43
internal/db/sqlc/copyfrom.go
Normal file
43
internal/db/sqlc/copyfrom.go
Normal file
@@ -0,0 +1,43 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.31.1
|
||||
// source: copyfrom.go
|
||||
|
||||
package db
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
// iteratorForCreateSysRolePermission implements pgx.CopyFromSource.
|
||||
type iteratorForCreateSysRolePermission struct {
|
||||
rows []CreateSysRolePermissionParams
|
||||
skippedFirstNextCall bool
|
||||
}
|
||||
|
||||
func (r *iteratorForCreateSysRolePermission) 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 iteratorForCreateSysRolePermission) Values() ([]interface{}, error) {
|
||||
return []interface{}{
|
||||
r.rows[0].RoleID,
|
||||
r.rows[0].PermissionID,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (r iteratorForCreateSysRolePermission) Err() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (q *Queries) CreateSysRolePermission(ctx context.Context, arg []CreateSysRolePermissionParams) (int64, error) {
|
||||
return q.db.CopyFrom(ctx, []string{"sys_role_permission"}, []string{"role_id", "permission_id"}, &iteratorForCreateSysRolePermission{rows: arg})
|
||||
}
|
||||
Reference in New Issue
Block a user