On 12/26/2015 11:44 PM, Krishnakant wrote: > Hi, > The subject says it all. > I have classes inheriting the base and thus my tables are created using > ORM. > But I wish to use sql expression language for queries, particularly bulk > selects for faster performance. > So is this possible and how?
in recent SQLA versions the classes can be fed right into select(): stmt = select([MyClass]).where(MyClass.foo == "bar") however, you can just as easily use Query and just get Query.statement to get a core statement as well. If you Query against individual columns too, e.g. sess.query(MyClass.id, MyClass.bar), there's little performance difference between that and Core in updated versions (see the performance suite and run some experiments with it: http://docs.sqlalchemy.org/en/rel_1_0/orm/examples.html#module-examples.performance > Happy hacking. > Krishnakant. > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.