[Chicago] benchmarks

Isaac Csandl nerkles at gmail.com
Wed Apr 2 15:52:59 CEST 2008


On Apr 1, 2008, at 10:28 PM, Massimo Di Pierro wrote:
> I hope somebody here can help me with some suggestions. For example,
> how do I do in SQLAlchemy and Storm the following?
>
> - joins
>
>>>> rows=db((db.table1.field1==db.table2.field2)&
> (db.table2.field2.year()<2000)).select()
>

in SA, assuming you've set up classes and mappers already:
q =  
session 
.query 
(Class1).join('name_of_relation_to_class2').filter(Class2.year<2000)

then print q to see the actual query - or add .all() to run it  
immediately

i'd do more, but i'm out of time for today.  HTH.

--isaac



More information about the Chicago mailing list