(ctx context.Context, hooks ...queryHook)
| 331 | } |
| 332 | |
| 333 | func (_q *BouncerQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Bouncer, error) { |
| 334 | var ( |
| 335 | nodes = []*Bouncer{} |
| 336 | _spec = _q.querySpec() |
| 337 | ) |
| 338 | _spec.ScanValues = func(columns []string) ([]any, error) { |
| 339 | return (*Bouncer).scanValues(nil, columns) |
| 340 | } |
| 341 | _spec.Assign = func(columns []string, values []any) error { |
| 342 | node := &Bouncer{config: _q.config} |
| 343 | nodes = append(nodes, node) |
| 344 | return node.assignValues(columns, values) |
| 345 | } |
| 346 | for i := range hooks { |
| 347 | hooks[i](ctx, _spec) |
| 348 | } |
| 349 | if err := sqlgraph.QueryNodes(ctx, _q.driver, _spec); err != nil { |
| 350 | return nil, err |
| 351 | } |
| 352 | if len(nodes) == 0 { |
| 353 | return nodes, nil |
| 354 | } |
| 355 | return nodes, nil |
| 356 | } |
| 357 | |
| 358 | func (_q *BouncerQuery) sqlCount(ctx context.Context) (int, error) { |
| 359 | _spec := _q.querySpec() |
nothing calls this directly
no test coverage detected