[sqlalchemy] multiple columns in correlated subquery?

2011-05-31 Thread Stephen Emslie
In Oracle, I would like to perform a correlated subquery where multiple columns are specified in the set clause and those columns are selected by the subquery. For example: UPDATE table1 a SET (a.column1, a.column2) = (SELECT b.column1, b.column2 FROM table2 b WHERE a.id=b.id) WHERE

[sqlalchemy] Re: Overriding reflected columns in SqlSoup?

2009-04-28 Thread Stephen Emslie
the underlying schema defines no primary key. That part seemed fine, but I then had to work with relations on those tables that I was mapping explicitly and I found it easier at that point just to skip SqlSoup and define the table metadata and mapping myself. I hope that helps. Stephen Emslie

[sqlalchemy] Overriding reflected columns in SqlSoup?

2009-04-25 Thread Stephen Emslie
reflecting tables directly with sqlalchemy, using Table(name, meta, autoload=True), one can override the reflected columns to compensate for the lack of a primary key. Is this possible in SqlSoup? Stephen Emslie --~--~-~--~~~---~--~~ You received this message

[sqlalchemy] Re: How to map columns into a tuple using SQLAlchemy?

2009-03-13 Thread Stephen Emslie
You could try changing your _limit tuple to a property on the class that returns the tuple you want. For example: class Result(object): def get_limit(self): return (self.upper, self.lower, self.nominal) _limit = property(get_limit) Is this what you were looking for? Stephen Emslie

[sqlalchemy] Re: getting the number of records in a result set from select

2009-03-13 Thread Stephen Emslie
Well, I would have expected ResultProxy.rowcount to do just that (return the number of rows in the last executed statement) but I just get 0 from it. Perhaps someone could explain how to use it correctly. Stephen Emslie On Thu, Mar 12, 2009 at 5:20 PM, jeff jeffre...@gmail.com wrote: hi

[sqlalchemy] Re: SQLAlchemy Migrate

2009-03-06 Thread Stephen Emslie
It is always good to see some activity on this front. sqlalchemy-migrate seems to be a good idea that needs more activity. Perhaps try contributing to that project before branching. Any comment from the sqlalchemy-migrate developers? Stephen On Fri, Mar 6, 2009 at 3:13 PM, J. Cliff Dyer

[sqlalchemy] Re: Cascading delete

2008-08-21 Thread stephen emslie
Hi Bob Looks like you're doing some fun thinking :) Steve On Thu, Aug 21, 2008 at 11:04 AM, Bob Farrell [EMAIL PROTECTED] wrote: Hi there, I spoke with zzzeek_ on IRC yesterday re: some code I'd written for an introspective cascading delete function. We were previously using the ORM to

[sqlalchemy] Re: path based options and contains_eager

2007-11-18 Thread stephen emslie
that might actually be the correct behaviour here. Stephen Emslie On Nov 18, 2007 4:20 PM, Michael Bayer [EMAIL PROTECTED] wrote: On Nov 16, 2007, at 12:29 PM, stephen emslie wrote: I'm a bit confused now, so please tell me if I've got something fundamentally wrong here, otherwise

[sqlalchemy] path based options and contains_eager

2007-11-16 Thread stephen emslie
Stephen Emslie --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: adjacency list: filtering relations eagerly

2007-10-09 Thread stephen emslie
contains_eager statement to be issued ends up as the only 'children' relation in the result) Any idea whether this is a bug or expected behavior? I could try to rustle up a test script if it would help. Stephen Emslie On 9/11/07, stephen emslie [EMAIL PROTECTED] wrote: I've done some more playing

[sqlalchemy] Re: adjacency list: filtering relations eagerly

2007-10-09 Thread stephen emslie
Thanks for the quick response. Looking forward to the refactoring :) Stephen Emslie On 10/9/07, Michael Bayer [EMAIL PROTECTED] wrote: On Oct 9, 2007, at 10:18 AM, stephen emslie wrote: Hi. I've been quiet on this for a while. I'm getting by without this behavior, though it would

[sqlalchemy] Re: adjacency list: filtering relations eagerly

2007-09-11 Thread stephen emslie
. Thanks for the help! Stephen Emslie On 9/4/07, stephen emslie [EMAIL PROTECTED] wrote: im going to play with this a little bit, but my first instinct is that you might want to use contains_eager('children.children', ...) for your deeper aliases. but im not sure if something might prevent

[sqlalchemy] Re: adjacency list: filtering relations eagerly

2007-09-04 Thread stephen emslie
(i.e. skipping the first relation), but its nice to know I wasn't completely off that mark :) Stephen Emslie --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email

[sqlalchemy] Re: adjacency list: filtering relations eagerly

2007-08-31 Thread stephen emslie
from_statement() like we're doing above. This would certainly neaten things up :) Stephen Emslie --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy

[sqlalchemy] between_op() error with property expressions: is this a bug?

2007-08-23 Thread stephen emslie
here? MappedClass.c.age.between(1,2) behaves normally. Stephen Emslie --~--~-~--~~~---~--~~ 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

[sqlalchemy] adjacency list: filtering relations eagerly

2007-08-20 Thread stephen emslie
Hi. I am using a self-referential mapper to represent a multi-level tree of parent-child relationships. Typically I've been querying each parent for children that I am interested in. Up till now I have made a new query for each child that I am looking for, which is doesn't seem like the most