sripathikrishnan / jinjasql

Template Language for SQL with Automatic Bind Parameter Extraction
MIT License
815 stars 89 forks source link

Default placeholder (*format) not up to date with Python 3's sqlite module #21

Closed dnswrsrx closed 4 years ago

dnswrsrx commented 5 years ago

Just wondering if this is a necessary fix just pertaining to using Jinjasql with sqlite3?

According to Python 3's Sqlite3 documentation, sqlite3 only accepts two kinds of placeholders when parameterising queries: question mark and named style. Would it be necessary to set the default param_style to be qmark?

sripathikrishnan commented 4 years ago

Yes, for sqlite, you should set the param_style to qmark. Closing this issue as there isn't a defect or feature. Thanks!