mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-14 16:17:29 -06:00
upstep bun to v1.0.14 (#291)
This commit is contained in:
parent
84a8a07f38
commit
8b7c3507fe
100 changed files with 5071 additions and 3836 deletions
25
vendor/github.com/uptrace/bun/model_table_slice.go
generated
vendored
25
vendor/github.com/uptrace/bun/model_table_slice.go
generated
vendored
|
|
@ -91,10 +91,31 @@ func (m *sliceTableModel) ScanRows(ctx context.Context, rows *sql.Rows) (int, er
|
|||
return n, nil
|
||||
}
|
||||
|
||||
var _ schema.BeforeAppendModelHook = (*sliceTableModel)(nil)
|
||||
|
||||
func (m *sliceTableModel) BeforeAppendModel(ctx context.Context, query Query) error {
|
||||
if !m.table.HasBeforeAppendModelHook() {
|
||||
return nil
|
||||
}
|
||||
|
||||
sliceLen := m.slice.Len()
|
||||
for i := 0; i < sliceLen; i++ {
|
||||
strct := m.slice.Index(i)
|
||||
if !m.sliceOfPtr {
|
||||
strct = strct.Addr()
|
||||
}
|
||||
err := strct.Interface().(schema.BeforeAppendModelHook).BeforeAppendModel(ctx, query)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Inherit these hooks from structTableModel.
|
||||
var (
|
||||
_ schema.BeforeScanHook = (*sliceTableModel)(nil)
|
||||
_ schema.AfterScanHook = (*sliceTableModel)(nil)
|
||||
_ schema.BeforeScanRowHook = (*sliceTableModel)(nil)
|
||||
_ schema.AfterScanRowHook = (*sliceTableModel)(nil)
|
||||
)
|
||||
|
||||
func (m *sliceTableModel) updateSoftDeleteField(tm time.Time) error {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue