Repository navigation
JiT SQLX support - #2087
Merged
Merged
JiT SQLX support#2087
Conversation
ikholopov-omni
force-pushed
the
jit-compile-sqlx
branch
2 times, most recently
from
February 11, 2026 13:08
94c2995 to
311db90
Compare
ikholopov-omni
marked this pull request as ready for review
February 11, 2026 13:19
rafal-hawrylak
force-pushed
the
jit-compile-sqlx
branch
from
October 22, 2026 20:23
311db90 to
c80cbfe
Compare
rafal-hawrylak
requested review from
Ford544,
apilaskowski and
mbiernacik
and removed request for
udim
October 22, 2026 20:27
mbiernacik
requested changes
Oct 23, 2026
mbiernacik
left a comment
Contributor
There was a problem hiding this comment.
Main concern: in JiT mode the SQLX code stays a string until run, so problems that AoT reports during compile now only appear at run time:
- JiT detection evaluates
configearly. Configs that reference includes ordataform.*fall back to AoT and fail with a confusingUnexpected property "compilation_mode". - The generated
jitCodeis never parsed at compile time, so syntax errors (including clashes with the newly injectedadapter/data/executionData) only show up at run time. - JiT SQLX behaves differently from AoT SQLX:
ref()doesn't register dependencies, and includes don't seem to be available at JiT time.
Could the PR description also mention these differences and assertion support, and link a docs/CHANGELOG update? Details and suggestions inline.
apilaskowski
requested changes
Oct 23, 2026
rafal-hawrylak
force-pushed
the
jit-compile-sqlx
branch
from
October 23, 2026 17:13
c80cbfe to
d421a86
Compare
Collaborator
|
Addressed inline comments and updated PR description. |
mbiernacik
approved these changes
Oct 26, 2026
apilaskowski
approved these changes
Nov 3, 2026
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.
Adds support for
compilation_mode: "jit"in SQLX files fortable,view,incremental,operations, andassertionactions.Notes on JiT SQLX vs AoT SQLX:
ref()andresolve()are evaluated at JiT execution time against declared dependencies; dependencies must be listed inconfig { dependencies: [...] }.includes/globals are only in scope duringconfigevaluation at compile time; values needed inside JiTjs {}or SQL blocks should be passed viadataform.jitContextData(exposed asdatain JiT context).