@@ -104,10 +104,10 @@ func (v *View[T, Tslice]) Prepare(ctx context.Context, exec bob.Preparer, queryM
104
104
105
105
// Prepare a statement from an existing query that will be mapped to the view's type
106
106
func (v * View [T , Tslice ]) PrepareQuery (ctx context.Context , exec bob.Preparer , q bob.Query ) (bob.QueryStmt [T , Tslice ], error ) {
107
- return bob .PrepareQueryx [T , Tslice ](ctx , exec , q , scan .StructMapper [T ](), v .afterSelect (ctx , exec ))
107
+ return bob .PrepareQueryx [T , Tslice ](ctx , exec , q , scan .StructMapper [T ](), v .afterSelect (exec ))
108
108
}
109
109
110
- func (v * View [T , Ts ]) afterSelect (ctx context. Context , exec bob.Executor ) bob.ExecOption [T ] {
110
+ func (v * View [T , Ts ]) afterSelect (exec bob.Executor ) bob.ExecOption [T ] {
111
111
return func (es * bob.ExecSettings [T ]) {
112
112
es .AfterSelect = func (ctx context.Context , retrieved []T ) error {
113
113
_ , err := v .AfterSelectHooks .Do (ctx , exec , retrieved )
@@ -173,23 +173,23 @@ func (v *ViewQuery[T, Tslice]) One() (T, error) {
173
173
if err := v .hook (); err != nil {
174
174
return * new (T ), err
175
175
}
176
- return bob .One (v .ctx , v .exec , v , v .view .scanner , v .view .afterSelect (v .ctx , v . exec ))
176
+ return bob .One (v .ctx , v .exec , v , v .view .scanner , v .view .afterSelect (v .exec ))
177
177
}
178
178
179
179
// All matching rows
180
180
func (v * ViewQuery [T , Tslice ]) All () (Tslice , error ) {
181
181
if err := v .hook (); err != nil {
182
182
return nil , err
183
183
}
184
- return bob .Allx [T , Tslice ](v .ctx , v .exec , v , v .view .scanner , v .view .afterSelect (v .ctx , v . exec ))
184
+ return bob .Allx [T , Tslice ](v .ctx , v .exec , v , v .view .scanner , v .view .afterSelect (v .exec ))
185
185
}
186
186
187
187
// Cursor to scan through the results
188
188
func (v * ViewQuery [T , Tslice ]) Cursor () (scan.ICursor [T ], error ) {
189
189
if err := v .hook (); err != nil {
190
190
return nil , err
191
191
}
192
- return bob .Cursor (v .ctx , v .exec , v , v .view .scanner , v .view .afterSelect (v .ctx , v . exec ))
192
+ return bob .Cursor (v .ctx , v .exec , v , v .view .scanner , v .view .afterSelect (v .exec ))
193
193
}
194
194
195
195
// Count the number of matching rows
0 commit comments