Skip to content

BE-930: Keep definition variables as $NAME SQL parameters - #10000

Draft
thehabbos007 wants to merge 1 commit into
asa/hash-integrations/03b-definition-property-testsfrom
asa/hash-integrations/03c-definition-sql-parameters
Draft

thehabbos007 wants to merge 1 commit into
asa/hash-integrations/03b-definition-property-testsfrom
asa/hash-integrations/03c-definition-sql-parameters

Conversation

@thehabbos007

Copy link
Copy Markdown
Contributor

🌟 Purpose

Lowering replaced ${NAME} in SQL with the variable's value, so the value became part of the query text. SQL is now kept as written and reads variables as DuckDB parameters, $NAME, which DuckDB binds as values.

🔍 Changes

  • Definition::variables() returns the new Variables type. It refuses two names that differ only in ASCII case, because DuckDB matches parameter names that way, and lowering reports the pair at vars.<name>.
  • ${NAME} placeholders outside SQL are still replaced. They now match names regardless of ASCII case, through VariableName::matches.
  • SqlQuery stores a Box<str>.

⚠️ Known issues

  • An undeclared $NAME parameter is reported only when the query runs.

@thehabbos007 thehabbos007 self-assigned this Oct 12, 2026
@github-actions github-actions Bot added area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team area/tests New or updated tests area/apps > hash-integrations labels Oct 12, 2026
@thehabbos007
thehabbos007 added this pull request to stack #9985 October 12, 2026 14:49
@vercel

vercel Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hash Ready Ready Preview Oct 13, 2026 10:19am UTC
petrinaut Ready Ready Preview Oct 13, 2026 10:19am UTC
petrinaut-docs Ready Ready Preview Oct 13, 2026 10:19am UTC
1 Skipped Deployment
Project Deployment Actions Updated
hashdotdesign-tokens Ignored Ignored Preview Oct 13, 2026 10:19am UTC

Request Review

This branch was successfully deployed

3 active deployments
Preview – petrinaut-docs — 7a3a9ede Deployed Oct 13, 2026 by vercel[bot]
Preview – hash — 7a3a9ede Deployed Oct 13, 2026 by vercel[bot]
Preview – petrinaut — 7a3a9ede Deployed Oct 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash-integrations area/libs Relates to first-party libraries/crates/packages (area) area/tests New or updated tests type/eng > backend Owned by the @backend team

Development

Successfully merging this pull request may close these issues.

1 participant