- changed status to wontfix
bindparam documentation is wrong
Issue #1387
resolved
Documentation for bindparam looks like this:
session.execute(select_statement, binding1=value1, binding2=value2)
It should look like this:
session.execute(select_statement, params=dict(binding1=value1, binding2=value2))
This particular bit of bad documentation cost me about 1.5 hours last night to try to fix. I'll try to submit a patch for it soon.
Comments (1)
-
repo owner - Log in to comment
Sorry I can't locate where you're seeing that documentation. There is only one section of the docs I can find which have examples for
Session.execute()
, at http://www.sqlalchemy.org/docs/05/session.html#using-sql-expressions-with-sessions , and the examples are correct:note that the signature for
Session.execute
is different than that of a straight connectable (i.e.Engine
orConnection
) so you may be confusing the two different sub-libraries.