[chore] bump bun library versions (#2837)

This commit is contained in:
kim 2024-04-15 11:01:20 +01:00 committed by GitHub
commit 1018cde107
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 403 additions and 388 deletions

View file

@ -116,9 +116,6 @@ func (m *structTableModel) BeforeScanRow(ctx context.Context) error {
if m.table.HasBeforeScanRowHook() {
return m.strct.Addr().Interface().(schema.BeforeScanRowHook).BeforeScanRow(ctx)
}
if m.table.HasBeforeScanHook() {
return m.strct.Addr().Interface().(schema.BeforeScanHook).BeforeScan(ctx)
}
return nil
}
@ -144,21 +141,6 @@ func (m *structTableModel) AfterScanRow(ctx context.Context) error {
return firstErr
}
if m.table.HasAfterScanHook() {
firstErr := m.strct.Addr().Interface().(schema.AfterScanHook).AfterScan(ctx)
for _, j := range m.joins {
switch j.Relation.Type {
case schema.HasOneRelation, schema.BelongsToRelation:
if err := j.JoinModel.AfterScanRow(ctx); err != nil && firstErr == nil {
firstErr = err
}
}
}
return firstErr
}
return nil
}
@ -325,7 +307,7 @@ func (m *structTableModel) scanColumn(column string, src interface{}) (bool, err
}
}
if field, ok := m.table.FieldMap[column]; ok {
if field := m.table.LookupField(column); field != nil {
if src == nil && m.isNil() {
return true, nil
}