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

[Python] Add SQL syntax highlighting in f-strings #3888

Closed
wants to merge 2 commits into from

Conversation

deathaxe
Copy link
Collaborator

@deathaxe deathaxe commented Dec 13, 2023

Resolves #3885

This PR proposes to add support for SQL syntax highlghting within f-strings.

I have no strong opinion about adding this.
The change was easy, so proposing it for thosw who want it.

Note: With #3046 Python's syntax cache grows from about 3MB to 4MB with this PR merged.

@jrappen
Copy link
Contributor

jrappen commented Dec 15, 2023

Appreciate the notes in the commit message.

@FichteFoll
Copy link
Collaborator

FichteFoll commented Dec 28, 2023

I'd like to see an actual use case of using SQL with an f-string before adding this, considering that it significantly increases the cache size along with #3046 (by 33%!) for what seems like rather little gain. I have some ideas for building an sql statement from a string where a prepared statement (with proper value insertion) would not suffice, but I still doubt whether an f-string is the best or even a proper solution in those cases.

@deathaxe deathaxe closed this Apr 28, 2024
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.

[NOT IMPORTANT] Python f-strings do not highlight as SQL syntax
4 participants