Repository navigation
v0.25.3
Patch Changes
-
#295
04e401bThanks @abrahamguo! - Theembedded-sqlprocessor now lints statements that use postgres.js's
sql(...)helpers, such asWHERE id IN ${sql(ids)},
INSERT INTO users ${sql(user)}andUPDATE users SET ${sql(user)}. Before,
every${...}became a bare identifier, which cannot parse in those spots, so
the whole statement was silently skipped. A${...}there now stands in as
the list, rows or assignments it expands to. -
#296
2bad365Thanks @abrahamguo! -no-syntax-errornow reports syntax errors insqltemplates that contain a
${...}, such assql`SELECT id,, name FROM users WHERE id = ${id}`.
Before, theembedded-sqlprocessor skipped every such template that failed
to parse, because the identifier standing in for a${...}can itself be what
does not parse. It now skips a template only when the parse fails on that
identifier, or right after it at the end of the statement or on a reserved
word such asSELECTorWHERE: there, the${...}held a clause rather
than a value.