# `PgFlowDashboard.Queries.Jobs`
[🔗](https://github.com/agoodway/pgflow/blob/v0.1.0/lib/pgflow_dashboard/queries/jobs.ex#L1)

Database queries for job-related data.

# `count_jobs`

```elixir
@spec count_jobs(module()) :: integer()
```

Counts all jobs.

# `get_job`

```elixir
@spec get_job(module(), String.t()) :: {:ok, map()} | {:error, :not_found | term()}
```

Gets a job's statistics.

# `get_run_history_grid`

```elixir
@spec get_run_history_grid(module(), String.t(), keyword()) :: [map()]
```

Gets run history data for a job's activity grid.

Returns a list of run result cells for the single job step.

# `list_jobs`

```elixir
@spec list_jobs(
  module(),
  keyword()
) :: [map()]
```

Lists jobs with statistics.

## Options
  * `:limit` - Maximum number of jobs to return
  * `:cursor` - Cursor for pagination (flow_slug to start after)

---

*Consult [api-reference.md](api-reference.md) for complete listing*
