# libtmux.query.where

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Lua
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-lua/blob/d68f829fe097e38dcbbf7147e276666fe615f0cf/lua/libtmux/query.lua#L106
- **Page:** https://libtmux.org/en/lua/v0.1.1/reference/libtmux-query-where/

```
where: fun(
  rows: <T>[]|libtmux.Selection<T>,
  criteria: libtmux.CompiledQuery|libtmux.Where,
  schema: libtmux.QuerySchema?,
):libtmux.Selection<T>
```

Validate the entire grammar and required data before selecting records.

## Parameters

- `rows` (`<T>[]|libtmux.Selection<T>`)
- `criteria` (`libtmux.CompiledQuery|libtmux.Where`)
- `schema` (`libtmux.QuerySchema?`): Required for ordinary sequences with uncompiled criteria.

## Guides

Pages that discuss `where`.

- [Query captured data](/en/lua/v0.1.1/guides/query/)
