|
|
|
|
|
by crazygringo
420 days ago
|
|
> or the code expects a Template, in which case passing it a string would blow it up. That's where the problem is though -- in most cases it probably won't blow up. Plenty of SQL queries don't have any parameters at all. You're just getting the number of rows in a table or something. A raw string is perfectly fine. Will sqlite3 really disallow strings? Will it force you to use templates, even when the template doesn't contain any parameters? You can argue it should, but that's not being very friendly with inputs, and will break backwards compatibility. Maybe if there's a flag you can set in the module to enable that strict behavior though, with the idea that in a decade it will become the default? |
|
There's definitely a backwards compatibility hurdle of switching to a template-only API, but a template-only API doesn't look that much "less friendly" with inputs, when the only difference is a `t` before every string, regardless of number of parameters.