Filtering
Filter methods on the Athena.js query builder and how they map to gateway conditions (eq, ilike, in, or, not, array ops).
Filters accumulate on the shared filter chain and are sent in one request. Chain them before or after .select() / .update() (conditions become the WHERE clause for updates).
Examples
const { data } = await athena
.from("users")
.select("id, name, email")
.eq("active", true)
.gte("score", 100)
.ilike("email", "%@example.com")
.not("role", "eq", "banned");Canonical style:
const { data } = await athena
.from("instruments")
.select("name, section_id")
.eq("name", "violin");Filter methods
| Method | SQL equivalent |
|---|---|
.eq(col, val) | col = val |
.neq(col, val) | col != val |
.gt(col, val) | col > val |
.gte(col, val) | col >= val |
.lt(col, val) | col < val |
.lte(col, val) | col <= val |
.like(col, val) | col LIKE val |
.ilike(col, val) | col ILIKE val |
.is(col, val) | col IS val |
.in(col, vals) | col IN (…) |
.contains(col, vals) | col @> vals |
.containedBy(col, vals) | col <@ vals |
.match(filters) | multiple col = val |
.not(col, op, val) | NOT col op val |
.or(expression) | col1.op1.val1,col2.op2.val2 |