fix(model,tools): BoxLang IN-list extraction parity and coverage-tool repairs - #3442
Merged
Conversation
… repairs
- model/sql.cfc: the BoxLang branch of $addWhereClauseParameters now
matches the Lucee/Adobe ReplaceList path byte-for-byte — IN-lists keep
their quoted items verbatim (the list branch of $queryParams unquotes
via $cleanInStatementValue), and single values drop exactly one pair of
outer quotes so inner apostrophes survive. Fixes crudSpec's
'parenthesis commas and single quotes' IN spec on every BoxLang leg
(the previous regex-strip corrupted doubled-apostrophe values).
- tools/code-quality/cfml-coverage.py:
- mask strings and comments before matching so JS function literals
inside CFML strings no longer get counters inserted mid-string
(compile break in controller/channels.cfc)
- capture only the cffunction NAME as the counter id (whole-tag ids
embedded quotes = invalid CFML)
- instrument guarded closure assignments (variables.$x = function)
like the complexity analyzer does
- collect all insertion points before mutating so counter insertions
cannot shift later matches
- combine accepts both the dict form (--baseline write) and the list
form (--json) of the complexity input
Signed-off-by: Peter Amiri <peter@alurium.com>
…xrows
BoxLang's JDBC layer calls setLargeMaxRows(), which the PostgreSQL
driver does not implement ('is not yet implemented') — getMonitorData's
recentJobs/oldestPending queries threw, the surrounding catch returned
empty arrays, and B3 failed on the BoxLang + PostgreSQL/CockroachDB
legs. Bound all three queries with the existing dialect-aware
$candidateLimitClause (LIMIT / FETCH FIRST / OFFSET-FETCH) instead of
the driver maxrows option, with a CFML break as a backstop on the
recent-jobs array build.
Verified: jobs area 86/0/0 on BoxLang + PostgreSQL and BoxLang + SQLite.
Signed-off-by: Peter Amiri <peter@alurium.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-ups from the post-merge matrix dispatch:
BoxLang IN-list extraction parity — the BoxLang branch of
$addWhereClauseParametersregex-stripped quote pairs, corrupting doubled-apostrophe values. It now matches the Lucee/AdobeReplaceListpath byte-for-byte: IN-lists keep their quoted items verbatim (unquoted downstream by$cleanInStatementValue), single values drop exactly one pair of outer quotes. Fixes crudSpec's "should respect parenthesis commas and single quotes when using IN statement" on every BoxLang leg.Job monitor + retry queries bounded in SQL text, not driver
maxrows— BoxLang's JDBC layer callssetLargeMaxRows(), which the PostgreSQL driver does not implement ("is not yet implemented"), sogetMonitorData's queries threw and its catch returned empty arrays (B3 failed on BoxLang + PostgreSQL/CockroachDB). All three queries now use the existing dialect-aware$candidateLimitClause.Coverage-tool repairs (found while producing the fresh CRAP measurement):
function name(){inside CFML string literals no longer gets a counter inserted mid-string — the parse break incontroller/channels.cfc)<cffunction>name as the counter idcombineaccepts both the dict form (--baseline write) and list form (--json) of the complexity inputVerification