hi,

i have a method that returns list of (material, thickness) groups which 
looks like:

         C = [order_element_items.c.material_uuid,
              materials.c.name,
              order_element_items.c.thickness]
         S = select(
             C, order_element_items.c.material_uuid==materials.c.uuid,
             from_obj=[order_element_items, materials],
             order_by=[materials.c.name, order_element_items.c.thickness],
             group_by=C,
         )
         res = [(session.query(Material).filter_by(uuid=a).one(), c) for 
a,b,c in session.bind.execute(S)]


but it does too many selects and i wonder is it possible somehow to 
achieve the same result with one select?

thanks in advance


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to