Implements phase 2 of docs/design-sql-bound-parameters.md. jetc --lint-sql
[--strict] <file|dir>... lists each <sql> whose statement contains a $[...]
or #[...] reference instead of a <bind>, with file:line and where each value
comes from. Row values ($[.col], $[session.col], $[?N], $[#]) are only
reported with --strict. References in <bind>, <if>, <set> and the other
attribute-only tags, <comment> and |> <| are skipped. A custom tag defined
as <sql><container></sql> (barant.com's <showtable>) is checked at each use.
Exit status is 0 for none found, 1 for findings, 2 for an unreadable path.
- jetc/JetLint.*: the scanner; jetc.cpp: the option
- build scripts and runbindtests.sh: link JetLint.cpp
- tests/runlinttests.sh and tests/lintsql/: fixtures and expected output
- docs: worklist for the local copies of both sites, design doc status,
manual note on the lint
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Implements phase 1 of docs/design-sql-bound-parameters.md: <bind> supplies
the value for the next ? placeholder of the enclosing <sql>, with typed
validation (int, decimal, date, datetime, bool, ident with allow list),
null="empty", and refusal to change the connection character set.
- SqlBind.*: MySQL-free placeholder scanning and binding logic
- __bind.*, __sql, __mysql: runtime wiring
- Tag.cpp, jetc/JetParser.cpp: bind is a void tag in both
- jetc/JetCodegen: emit sized ZString literals for text holding a NUL,
which previously truncated the compiled page
- tests: unit tests, end-to-end test against MySQL (interpreted and
jetc-compiled), and the generator for the binary test page
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ltrim(x) removes leading blanks and rtrim(x) removes trailing blanks,
using the same characters trim removes (space, tab, newline). rtrim
counts by index so an all-blank value becomes empty. The manual now
documents trim, ltrim and rtrim with examples.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
<set name="x" value="..." scope="session"> now writes x to the session
file (any name, no @ prefix); values are still read with $[@x].
storeVariable passes the scope through instead of repeating the
global/local/parent checks for each value source.
Convert every <setenv> use on barant-site and qualityiron-site to a
plain <set> plus a scope="session" <set>, which keeps same-request
$[name] reads working, and remove setenv from both SESSIONCTL.tag
copies (sessionctl is deprecated for session management).
Document session variables and the set tag scopes in the Jet manual.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>