k98kurz / sqloquent

Python 3+ SQL ORM system inspired by Eloquent
Other
1 stars 0 forks source link

Make parameter interpolation optional in SQB `to_sql` method #5

Closed k98kurz closed 1 month ago

k98kurz commented 1 month ago

Is your feature request related to a problem? Please describe.

Currently, the SqlQueryBuilder.to_sql method interpolates all bound parameters, i.e. every "?" is replaced with the associated value.

Describe the solution you'd like

Change the Python syntax from to_sql() to to_sql(interpolate_params=False) and make the argument default value False.

Describe alternatives you've considered

Not doing it. It has been the alternative of choice while working on other stuff.

k98kurz commented 1 month ago

Done. Replicated in the AsyncSqlQueryBuilder as well.