Remix.run Logo
illegally 8 days ago

I guess this could be useful in SQL for escaping values, I saw a project on the comments here.

With templates:

  mysql.execute(t"DELETE FROM table WHERE id={id} AND param1={param1}")
Without templates:

  mysql.execute("DELETE FROM table WHERE id=%s AND param1=%s", [id, param1])
So one less argument to pass if we use templates.

But yeah it does seem a bit confusing, and maybe kinda not pythonic? Not sure.

zahlman 8 days ago | parent [-]

SQL templating is one of the explicitly cited motivating use cases.