Michael Bayer wrote:
heya HDM:

committed a "for_update=True" flag to select(), union(), union_all() which
tacks on a "FOR UPDATE" at the very end of the compiled string (its after
any kind of ORDER BY etc. right?)

That's right for postgresql at least. I'm not sure for any other database.

Huy
committed in changeset 1232.

- mike

HD Mail wrote:
HD Mail wrote:

Actually, ignore my last post. I had  a closer look and created this
patch. Hopefully it can be of some use.

I added a for_update attribute to the Select class.

Then changed the ansisql.py:

def visit_select_postclauses

to add my for_update statement.

It seems to work for me.

Huy


Michael Bayer wrote:
I dont have "FOR UPDATE" in there as of yet.   it can be added easily
enough, although im short on time this week.  feel free to add a
ticket (or dig around sql.py and see if you can figure it out)

Thanks Michael. I did have a look. I could add it in SelectBaseMixin
the same way you do order_by/group_by but because I not too familiar
with SA internals, I'm a bit reluctant.

Huy
On Mar 29, 2006, at 8:00 AM, HD Mail wrote:

Hi,

I am building a select using

st = table.select()
st.append_whereclause(...)

Is it possible to append something like "FOR UPDATE" at the end of
the generated select statement.

Before anyone shoots me down for using "for update", i'm writing a
stock control system.

I love the query building features in SA so I really want to use it
to write my sql rather then using straight sql.

Thanks

Huy



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to