Vex · Errors

Unknown column

compile throws invalid_dsl when a field names a column its table does not have. Every field is validated against the table it is qualified with, and the error lists that table’s columns in its message and in details.options. Typical cause: a model generates a plausible column name that does not exist.

Query
{
  from: ['members'],
  fields: ['members.name', 'members.email'],
}
Table
CREATE TABLE members (id text PRIMARY KEY, name text NOT NULL)
Error
invalid_dsl
Field "email" not found on entity "members". Available fields: id, name
Error details
{ options: ['id', 'name'] }
Output matches the expected value

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