Patch Changes
-
09fcf97: Validate the
<T>annotation on rawsqlfragments embedded in Kysely query-builder chains.SafeQL now checks that annotation against the type the database returns and autofixes it on a mismatch. A selection like
sql<number>`name || bio`.as("credit_line")whose column isstringgets flagged; a.where(sql<number>`bio is not null`)condition gets corrected toboolean. Conditions accept bothSqlBoolandboolean, and fragments wrapped in parentheses orasare checked like bare ones. -
21e97b3: Point invalid-query errors at the offending identifier. When Postgres reports an unknown column, table, relation, type, or function, the squiggle now lands on that specific token instead of the whole query — most noticeably for Kysely builder chains, where the error previously underlined the entire embedded
sqlfragment. -
Updated dependencies [09fcf97]
- @ts-safeql/plugin-utils@5.3.0