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

[NOT IMPORTANT] Python f-strings do not highlight as SQL syntax #3885

Closed
grinheckerdev opened this issue Dec 13, 2023 · 2 comments
Closed

[NOT IMPORTANT] Python f-strings do not highlight as SQL syntax #3885

grinheckerdev opened this issue Dec 13, 2023 · 2 comments

Comments

@grinheckerdev
Copy link

Problem description

Снимок экрана 2023-12-13 в 10 56 54 AM

Preferred solution

f-strings should be highlighted with SQL syntax.

Alternatives

N/A

Additional Information

No response

@grinheckerdev grinheckerdev changed the title Python f-strings do not highlight as SQL syntax [NOT IMPORTANT] Python f-strings do not highlight as SQL syntax Dec 13, 2023
@BenjaminSchaaf BenjaminSchaaf transferred this issue from sublimehq/sublime_text Dec 13, 2023
@keith-hall
Copy link
Collaborator

I personally see it as a feature that SQL is not highlighted inside fstrings. This form of interpolation can easily lead to SQL injection bugs/vulnerabilities. Instead it's better to pass parameters. Plus it helps with the SQL plan cache to have fewer distinct queries.

@deathaxe
Copy link
Collaborator

deathaxe commented Dec 13, 2023

I am rather concerned about amount of contexts in conjunction with #3046 as SQL is pushed with_prototype. Python's syntax cache already grows from 545kB to 2.9MB with that PR and might significantly grow further with more SQL contexts being added.

Adding SQL highlighting within f-strings is easy copy&paste though.

deathaxe added a commit to deathaxe/sublime-packages that referenced this issue Dec 13, 2023
@deathaxe deathaxe closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants