Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

nitpicking:

> It's not just a one character difference, it's a different type. So `db.execute` can reject strings both statically and dynamically.

in this case, that's not actually helpful because SQL statements don't need to have parameters, so db.execute will always need to accept a string.



You can just pass it a template with no substitutions.


> db.execute will always need to accept a string.

No. A t-string with no placeholders is perfectly fine. You can use that even if you have no parameters.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: