> ## Documentation Index
> Fetch the complete documentation index at: https://docs.auxilian.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Filters

> How to select rows with filters in list_rows, update_rows, and delete_rows.

`list_rows`, `update_rows`, and `delete_rows` select rows with a list of filters. A row matches only when it matches every filter (logical AND).

```json theme={null}
[
  { "col": "stage", "op": "eq", "value": "proposal" },
  { "col": "amount", "op": "gte", "value": 10000 }
]
```

## Filter object

<ParamField body="col" type="string" required>
  Column name. Any column in the table, including `id` and `created_at`.
</ParamField>

<ParamField body="op" type="string" required>
  One of the operators below.
</ParamField>

<ParamField body="value" type="string | number | boolean | null">
  The value to compare with. Omit it for `is_null` and `not_null`.
</ParamField>

## Operators

| `op` | SQL | Value |
| - | - | - |
| `eq` | `=` | Required, must fit the column type |
| `neq` | `<>` | Required, must fit the column type |
| `gt` | `>` | Required, must fit the column type |
| `gte` | `>=` | Required, must fit the column type |
| `lt` | `<` | Required, must fit the column type |
| `lte` | `<=` | Required, must fit the column type |
| `like` | `LIKE` (case-sensitive) | Required string pattern |
| `ilike` | `ILIKE` (case-insensitive) | Required string pattern |
| `is_null` | `IS NULL` | Omit |
| `not_null` | `IS NOT NULL` | Omit |

### Comparison operators

The value is converted to the column's type before comparing, with the same rules as inserts. For example, `"2026-11-01T00:00:00Z"` compares as a timestamp on a `timestamptz` column, and `"42"` compares as a number on an `integer` column. A value that can't be converted returns a `VALIDATION` error.

To match `NULL`, use `is_null` or `not_null`. Passing `null` as the value of a comparison operator returns:

```text theme={null}
Filter eq on "finished_on" needs a value (use is_null / not_null for nulls)
```

`neq` doesn't match rows where the column is `NULL`, as in SQL.

### Pattern operators

`like` and `ilike` compare the column's text form with a SQL pattern:

| Pattern | Matches |
| - | - |
| `%` | Any sequence of characters |
| `_` | Exactly one character |

```json theme={null}
{ "col": "email", "op": "ilike", "value": "%@example.com" }
```

Pattern operators work on any column type, because the column is compared as text. On a `jsonb` column, this matches against the JSON text, such as `%"fiction"%`.

## Examples

<CodeGroup>
  ```json Finished books rated 4 or higher theme={null}
  [
    { "col": "finished", "op": "eq", "value": true },
    { "col": "rating", "op": "gte", "value": 4 }
  ]
  ```

  ```json Rows created in November 2026 theme={null}
  [
    { "col": "created_at", "op": "gte", "value": "2026-11-01T00:00:00Z" },
    { "col": "created_at", "op": "lt", "value": "2026-12-01T00:00:00Z" }
  ]
  ```

  ```json One row by id theme={null}
  [
    { "col": "id", "op": "eq", "value": "0b7c1f7e-6f0e-4d3a-9a51-2f7c3d1b8e44" }
  ]
  ```

  ```json Contacts without a company theme={null}
  [
    { "col": "company_id", "op": "is_null" }
  ]
  ```
</CodeGroup>

## Not supported

* OR conditions. Make separate calls and combine the results.
* Comparing two columns with each other.
* Filtering on a key inside a `jsonb` value. Use `like` or `ilike` on the JSON text, or store the value in its own column.
* Joins. Read each table and match rows by their foreign key values.

<Warning>
  `update_rows` and `delete_rows` change every matching row. Run `list_rows` with the same filters first to check what matches.
</Warning>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.