Theres a ticket to support database-specific FOR UPDATE options in trac, for
now you'd need to use the usual routes into modifying the select statement
(@compiles for the select() construct, place extra _state on the select()
object read by your function, regexp it into the string, subclass Query to add
a new generative method to establish the state on Query and override
_compile_context to plug it onto context.statement).
Or if you want to provide a full patch with unit tests, that works too and I'll
commit.
On Feb 3, 2011, at 4:39 PM, Kent wrote:
> session.query(Cls).with_lockmode('update')
>
> will render "FOR UPDATE"
>
> Is there a way to render "FOR UPDATE OF <table or column>"?
>
> I ask because postgresql complains about locking FOR UPDATE when given
> an outer join. BUT, it is happy if you say "FOR UPDATE OF <left hand
> table>" given an outer join.
>
> Thanks in advance,
> Kent
>
> --
> 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.
>
--
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.