Quantco / pytsql

Run mssql scripts from Python.
BSD 3-Clause "New" or "Revised" License
14 stars 3 forks source link

Escape colons in (raw) SQL queries #77

Closed svengiegerich closed 1 year ago

svengiegerich commented 1 year ago

Motivation: Fixes #76

Changes: Add a tiny helper that escaped every colon before passing it to SQLAlchemy.

(Happy to hear more elegant suggestions...; or if _text() is used to often)

Tests: a5f1249110d0f3c4bafebef02f005f615550c107 with the new test failing, 7f6771a6e40edb87b596f7b6d7250144bbcaf9d9 succeeds