Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persist SQL param indexes over SQL adapter #7867

Merged
merged 2 commits into from
Oct 17, 2024
Merged

Conversation

aljazerzen
Copy link
Contributor

@aljazerzen aljazerzen commented Oct 16, 2024

Followup for #7748

Changes how we resolve SQL params. Previous behavior was determine order of internal SQL params by the order of resolver AST pass. This meant that we sometimes had to reorder params and args in pg protocol. The benefit of this was that we did not need to know how many params there are in the query in advance.

But there was a bug somewhere, because Java PostgreSQL driver was throwing errors which I was not able to repro using asyncpg.

Now I've added a pre-resolving AST pass that counts number of params, which allows internal and external SQL params to use same indexes. Which allows for simpler and faster pg protocol arg handling. But means a bit slower resolver.

@aljazerzen aljazerzen changed the base branch from master to sql-settings-unify October 16, 2024 13:26
@aljazerzen aljazerzen requested a review from msullivan October 16, 2024 13:31
@aljazerzen aljazerzen changed the title sql fix params Persist SQL param indexes over SQL adapter Oct 16, 2024
@aljazerzen aljazerzen changed the base branch from sql-settings-unify to master October 16, 2024 17:02
@aljazerzen aljazerzen changed the base branch from master to sql-access-policies October 16, 2024 17:03
@aljazerzen aljazerzen changed the base branch from sql-access-policies to master October 16, 2024 17:03
@aljazerzen aljazerzen merged commit 22cab5c into master Oct 17, 2024
24 checks passed
@aljazerzen aljazerzen deleted the sql-fix-params branch October 17, 2024 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants