Vex · Query DSL

Filter (filter)

filter takes one condition and compiles it to the WHERE clause; the example is eq, a column equal to a value. A string of the form table.column is parsed as a column reference. Any other string is a value, and a value written in the query is compiled into the SQL as a literal.

Query
{
  from: ['bookings'],
  fields: ['bookings.id', 'bookings.seats'],
  filter: { eq: ['bookings.show_night', '2026-10-24'] },
}
Table
CREATE TABLE bookings (
  id text PRIMARY KEY,
  show_night text NOT NULL REFERENCES shows(night),
  member_id text NOT NULL REFERENCES members(id),
  seats integer NOT NULL
)
SQL
SELECT b1.id AS "id", b1.seats AS "seats"
FROM bookings AS b1
WHERE b1.show_night = '2026-10-24'
LIMIT 100
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.