mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
upstep bun to v1.0.9 (#252)
This commit is contained in:
6
vendor/github.com/uptrace/bun/model_table_has_many.go
generated
vendored
6
vendor/github.com/uptrace/bun/model_table_has_many.go
generated
vendored
@ -19,7 +19,7 @@ type hasManyModel struct {
|
||||
structKey []interface{}
|
||||
}
|
||||
|
||||
var _ tableModel = (*hasManyModel)(nil)
|
||||
var _ TableModel = (*hasManyModel)(nil)
|
||||
|
||||
func newHasManyModel(j *relationJoin) *hasManyModel {
|
||||
baseTable := j.BaseModel.Table()
|
||||
@ -129,11 +129,11 @@ func (m *hasManyModel) parkStruct() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func baseValues(model tableModel, fields []*schema.Field) map[internal.MapKey][]reflect.Value {
|
||||
func baseValues(model TableModel, fields []*schema.Field) map[internal.MapKey][]reflect.Value {
|
||||
fieldIndex := model.Relation().Field.Index
|
||||
m := make(map[internal.MapKey][]reflect.Value)
|
||||
key := make([]interface{}, 0, len(fields))
|
||||
walk(model.Root(), model.ParentIndex(), func(v reflect.Value) {
|
||||
walk(model.rootValue(), model.parentIndex(), func(v reflect.Value) {
|
||||
key = modelKey(key[:0], v, fields)
|
||||
mapKey := internal.NewMapKey(key)
|
||||
m[mapKey] = append(m[mapKey], v.FieldByIndex(fieldIndex))
|
||||
|
Reference in New Issue
Block a user