[sqlalchemy] Re: How can I use and_ and or_ in the orm query ?

2012-05-10 Thread Jonathan Vanasco
Dan Kuebrich messaged me off-list -- the filter() method seems to accept the output of and_ & or_ it would be great if the docs in each section referenced this. On May 10, 5:19 pm, Jonathan Vanasco wrote: > they're in the sql.expression , and the orm.query object doesn't have > those methods.  w

[sqlalchemy] How can I use and_ and or_ in the orm query ?

2012-05-10 Thread Jonathan Vanasco
they're in the sql.expression , and the orm.query object doesn't have those methods. what query method do i use to integrate them ? -- 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.

Re: [sqlalchemy] How to insert a new row into a Sybase database table which has an IDENTITY primary key column?

2012-05-10 Thread Michael Bayer
On May 10, 2012, at 3:39 AM, Anthony Kong wrote: > I think I have found the root cause of the problem. > > I am using a sybase database server of version 15 ("Adaptive Server > Enterprise/15.0.3/EBF 17163") > > But for various reasons we are still using sybase ODBC driver 12.5. > > If I sw

Re: [sqlalchemy] Multi-table (polymorphic?) row-specific relations

2012-05-10 Thread Andrey Petrov
In this specific scenario, the tag sets each live a separate table sibling to the table they're representing, so it's not trivial to query over all tags across all tables. One thing you could do is UNION all the tag tables. To do this dynamically, you'd need to keep track of all the tag tables.

Re: [sqlalchemy] Multi-table (polymorphic?) row-specific relations

2012-05-10 Thread Ciaran Farrell
Ok, got it thanks. And how would you query the tags then? session.query(TagMix) won't work - neither will session.query(User). Is there a way of querying all tags, irrespective of what table they are 'attached' to? On Wednesday, 2 May 2012 14:18:21 UTC+2, Dave wrote: > > > Nope, just use the on