Packages icon indicating copy to clipboard operation
Packages copied to clipboard

[Python] Add SQL syntax highlighting in f-strings

Open deathaxe opened this issue 2 years ago • 2 comments

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.

deathaxe avatar Dec 13 '23 17:12 deathaxe

Appreciate the notes in the commit message.

jrappen avatar Dec 15 '23 22:12 jrappen

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.

FichteFoll avatar Dec 28 '23 22:12 FichteFoll