you know, this is what happens when we all think in all languages of
the world but need to program in english/python.

just so you understand, organ in the sense of part of the body (the
whole organization) - well, sounds better in hebrew.

On 24 דצמבר, 19:43, "Jorge Vargas" <[email protected]> wrote:
> On Wed, Dec 24, 2008 at 3:18 AM, Rotem Tamir <[email protected]> wrote:
>
> keep in mind that with SA you have sevral ways of doing this. You
> could have used attributes on the table object directly, also since
> your using Elixir, they expose the table object directly. Last but not
> least you should drop the 'c' attribute as that is no longer supported
> at SA 
> 0.5http://www.sqlalchemy.org/trac/wiki/05Migration#ObjectRelationalMapping
>
>
>
> > finally the function:
>
> > def UpdateListDelta(list,delta):
> >  """
> >  This function receives a list of Organ IDs and runs an UPDATE query
> > on them to add a delta(float)
> >  to the sum_active_nodes_of_children column.
> >  """
> >  from sqlalchemy import update
> >  from turbogears.database import session
>
> >  session.execute(
> >    update(
> >      Organ.table,
> >      values = {Organ.c.sum_active_nodes_with_children:
> > Organ.c.sum_active_nodes_with_children+delta}
> >    ).where(Organ.c.code.in_(list))
> >  )
>
> I know this is totally unrelated but "Organ" and "children" in the
> same sentence kind of gives the whole code a dark twist.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to