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

Wanted: Universal helper function for quoting and escaping string values #20

Closed
amotl opened this issue Aug 16, 2024 · 2 comments
Closed

Comments

@amotl
Copy link
Member

amotl commented Aug 16, 2024

About

Use or provide a universal helper function for quoting and escaping string values in SQL.

Details

At #19 (review), @hammerhead suggested:

We can also check if there is a reusable method in SQLAlchemy, sqlalchemy-cratedb, or crate-python, which would already have sufficient test coverage. And such a method would be easier to re-use, since we will need it several times.

References

https://github.com/daq-tools/commons-codec/blob/898138eae3441b525592fa3a8dc7cded50458c43/src/commons_codec/transform/dynamodb.py#L146-L151

@amotl
Copy link
Member Author

amotl commented Aug 23, 2024

The right choice is probably not to apply quoting+escaping in userland, but to use parameter binding instead, as suggested by @seut at #34 (comment). Thank you.

@amotl amotl closed this as completed Aug 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

No branches or pull requests

1 participant