Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feature Request: escape identities #266

frafra started this conversation in Ideas
Discussion options

Having a function to escape identities allows creating more dynamic queries while reducing the risk of SQL Injection. psycopg has that: https://www.psycopg.org/psycopg3/docs/api/sql.html#psycopg.sql.Identifier.

Would it be enough to expose SQLIdentifier?

Workaround:

def identity_expression(value):
 return str(FunctionExpression("", ConstantExpression(value).alias("")))[1:-1]
You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /