On Oct 7, 2010, at 10:54 AM, Chris Withers wrote:
> Hi,
>
> I'd expect this:
>
> session.execute(
> 'select * from foo where bar=:baz',
> {}
> )
>
> ...to raise an exception.
>
> It doesn't, why not?
Session.execute() creates text(), and text() creates a bindparam() object for
:baz which has a value of None by default.
Do it like this if you like:
session.execute(
text("select * from foo where bar=:baz", bindparams=[bindparam('baz',
required=True)])
)
maybe we'll flip on "required=True" for the auto-params created by text() in
0.7.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.