You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1ede45f
Browse filesBrowse the repository at this point in the historyBrowse files
fix: keep SQL templates self-contained, use .replace() for filter placeholders
Address review feedback on PR #432:
1. Restore GROUP BY, ORDER BY, and LIMIT clauses to SQL template constants
so each template is a complete, readable query. Only the optional WHERE
filter placeholders ({warehouse_filter}, {user_filter}, etc.) are
replaced at the call site via .replace() — safe because they are
hardcoded SQL fragments, not user input.
2. Fix incorrect comment in query-history.ts claiming Postgres driver does
not support parameterized binds. The actual limitation is that our
connector wrapper (packages/drivers/src/postgres.ts) does not yet pass
the _binds parameter through to pg. LIMIT is still rendered inline via
Math.floor(Number(limit)) until the driver is updated.
3. Double-newline issue from empty filters is resolved by the .replace()
approach — replacing an empty placeholder leaves at most a blank line,
which SQL ignores.
Files: credit-analyzer.ts, query-history.ts, role-access.ts, tags.ts
Co-Authored-By: Vijay Yadav <[email protected]>
0 commit comments