[issue14619] Enhanced variable substitution for databases

2019-08-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue14619] Enhanced variable substitution for databases

2012-04-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Raymond, the variable substitution is normally done by the database and not the Python database modules, so you'd have to ask the database maintainers for assistance. The qmark ('?') parameter style is part of the ODBC standard, so it's unlikely that thi

[issue14619] Enhanced variable substitution for databases

2012-04-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I agree this would be very handy, but the database engines I know which accept "bind variables" (Oracle, MySQL, JDBC) only accept simple types. So to handle ?? it would be necessary to modify the SQL statement passed to the database server: "name in (?,

[issue14619] Enhanced variable substitution for databases

2012-04-18 Thread Raymond Hettinger
New submission from Raymond Hettinger : I suggest adding a ?? placeholder for variable length substitutions in SQL statements: vars = 'Knight', ('Gwain', 'Gallahad', 'Lancelot'), 30 c.execute('''SELECT * FROM loyalsubjects WHERE rank = ? AND name IN (??)