feat: release v1.0.0
This commit is contained in:
@@ -3,12 +3,45 @@
|
||||
// sqlc v1.31.1
|
||||
// source: copyfrom.go
|
||||
|
||||
package db
|
||||
package sqlc
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
// iteratorForCreatePostTag implements pgx.CopyFromSource.
|
||||
type iteratorForCreatePostTag struct {
|
||||
rows []CreatePostTagParams
|
||||
skippedFirstNextCall bool
|
||||
}
|
||||
|
||||
func (r *iteratorForCreatePostTag) 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 iteratorForCreatePostTag) Values() ([]interface{}, error) {
|
||||
return []interface{}{
|
||||
r.rows[0].PostID,
|
||||
r.rows[0].TagID,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (r iteratorForCreatePostTag) Err() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (q *Queries) CreatePostTag(ctx context.Context, arg []CreatePostTagParams) (int64, error) {
|
||||
return q.db.CopyFrom(ctx, []string{"post_tag"}, []string{"post_id", "tag_id"}, &iteratorForCreatePostTag{rows: arg})
|
||||
}
|
||||
|
||||
// iteratorForCreateSysRolePermission implements pgx.CopyFromSource.
|
||||
type iteratorForCreateSysRolePermission struct {
|
||||
rows []CreateSysRolePermissionParams
|
||||
@@ -41,3 +74,36 @@ func (r iteratorForCreateSysRolePermission) Err() error {
|
||||
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})
|
||||
}
|
||||
|
||||
// iteratorForCreateSysUserRole implements pgx.CopyFromSource.
|
||||
type iteratorForCreateSysUserRole struct {
|
||||
rows []CreateSysUserRoleParams
|
||||
skippedFirstNextCall bool
|
||||
}
|
||||
|
||||
func (r *iteratorForCreateSysUserRole) 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 iteratorForCreateSysUserRole) Values() ([]interface{}, error) {
|
||||
return []interface{}{
|
||||
r.rows[0].UserID,
|
||||
r.rows[0].RoleID,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (r iteratorForCreateSysUserRole) Err() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (q *Queries) CreateSysUserRole(ctx context.Context, arg []CreateSysUserRoleParams) (int64, error) {
|
||||
return q.db.CopyFrom(ctx, []string{"sys_user_role"}, []string{"user_id", "role_id"}, &iteratorForCreateSysUserRole{rows: arg})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user