Re: [sqlalchemy] postgres with .. select queries

2012-03-01 Thread Pau Tallada
I would love to see CTE integrated into SQLA too :) 2012/2/29 Michael Bayer mike...@zzzcomputing.com rough road ahead on that one for now, we have a @compiles recipe so far at http://www.sqlalchemy.org/trac/attachment/ticket/1859/cte_demo.py . You'd need to open it up to make it more generic

Re: [sqlalchemy] A hybrid_property with the same name as the attribute

2012-03-01 Thread Daniel Nouri
Thanks for your answer! On Wed, Feb 29, 2012 at 9:26 PM, Michael Bayer mike...@zzzcomputing.com wrote: On Feb 29, 2012, at 2:23 PM, Daniel Nouri wrote: I don't totally buy that since you can just change the superclass as needed, I'm not sure why that is a big deal.    If you're trying to

Re: [sqlalchemy] postgres with .. select queries

2012-03-01 Thread Michael Bayer
Right.. So what should I do about oracle CONNECT BY, which is what they have instead of WITH RECURSIVE... Consider that to be a different construct and ignore it for now? Or should there be some approach that approximates between WITH RECURSIVE and CONNECT BY transparently? The latter

Re: [sqlalchemy] postgres with .. select queries

2012-03-01 Thread A.M.
On Mar 1, 2012, at 9:41 AM, Michael Bayer wrote: Right.. So what should I do about oracle CONNECT BY, which is what they have instead of WITH RECURSIVE... Consider that to be a different construct and ignore it for now? Or should there be some approach that approximates between WITH

Re: [sqlalchemy] postgres with .. select queries

2012-03-01 Thread Claudio Freire
On Thu, Mar 1, 2012 at 12:11 PM, A.M. age...@themactionfaction.com wrote: Well, the SQL standard points at WITH RECURSIVE which is more general anyway. W.R. is basically an inductive query loop construct (base case UNION induction step) where CONNECT BY only handles key-based tree retrieval,

Re: [sqlalchemy] postgres with .. select queries

2012-03-01 Thread Michael Bayer
On Mar 1, 2012, at 10:47 AM, Claudio Freire wrote: On Thu, Mar 1, 2012 at 12:11 PM, A.M. age...@themactionfaction.com wrote: Well, the SQL standard points at WITH RECURSIVE which is more general anyway. W.R. is basically an inductive query loop construct (base case UNION induction step)

Re: [sqlalchemy] postgres with .. select queries

2012-03-01 Thread Michael Bayer
OK also, this is ready to go in from my perspective, I don't make usage of CTEs in my normal work at the moment, so hopefully those people here interested in the feature can give this a review, maybe even try the patch, because this will be it ! On Mar 1, 2012, at 12:40 PM, Michael Bayer

Re: [sqlalchemy] postgres with .. select queries

2012-03-01 Thread Claudio Freire
On Thu, Mar 1, 2012 at 5:08 PM, Michael Bayer mike...@zzzcomputing.com wrote: OK also, this is ready to go in from my perspective, I don't make usage of CTEs in my normal work at the moment, so hopefully those people here interested in the feature can give this a review, maybe even try the

Re: [sqlalchemy] postgres with .. select queries

2012-03-01 Thread Michael Bayer
right, I had the notion that it meant the JOIN is up at the top but that's silly, it works fine so here's the patch without anything not implemented: http://www.sqlalchemy.org/trac/attachment/ticket/1859/1859.patch someone else noted that you can use CTEs with INSERT, UPDATE, DELETE also, that

Re: [sqlalchemy] A hybrid_property with the same name as the attribute

2012-03-01 Thread Fayaz Yusuf Khan
On Thursday 01 Mar 2012 1:27:30 PM Daniel Nouri wrote: Yes that's what I'm doing. My magic base class is my CMS's Node class. I like that it's easy for add-on authors to derive from it, and have the adjacency list etc. all set up already. Maybe I'll just make what seems to be the most