Skip to content

Strict mode never checks INSERT column lists or UPDATE SET targets #282

Description

@tiagolauer

Strict mode never checks the INSERT column list or the UPDATE SET targets against the schema:

StrictRow<DB, 'insert into users (naem) values ($1)'>       // Record<string, never> - no error
StrictRow<DB, 'update users set naem = $1 where id = 1'>    // same

Both are guaranteed runtime errors on every engine. The documented list of unchecked clauses covers GROUP BY, HAVING and ORDER BY; column names in write statements are not on it, and no test pins this behavior either way.

Root cause: nothing scans the SET assignment targets or the INSERT column list against the schema. The DML branches in src/parse.ts use those lists only to position placeholders for params inference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions