| 350 | } |
| 351 | |
| 352 | func (e *Executor) JobCountByState(ctx context.Context, params *riverdriver.JobCountByStateParams) (int, error) { |
| 353 | numJobs, err := dbsqlc.New().JobCountByState(schemaTemplateParam(ctx, params.Schema), e.dbtx, string(params.State)) |
| 354 | if err != nil { |
| 355 | return 0, err |
| 356 | } |
| 357 | return int(numJobs), nil |
| 358 | } |
| 359 | |
| 360 | func (e *Executor) JobDelete(ctx context.Context, params *riverdriver.JobDeleteParams) (*rivertype.JobRow, error) { |
| 361 | // Unlike Postgres, this must be carried out in two operations because |