On Nov 22, 2013, at 10:31 AM, Chris Withers <ch...@simplistix.co.uk> wrote:

> On 22/11/2013 15:23, Michael Bayer wrote:
>> 
>>> (this latter query will likely have more stuff in it, not sure I used 
>>> .select_from(...).join(...) correctly either ;-)
>>> 
>>> Hope that illustrates what I'm after…
>> 
>> take your original cte and use it just like that, just call 
>> positions.c.instrument_id for that column.
>> 
>> or do you absolutely need to start with a raw string ?
> 
> I don't *need* to ;-) ...but I was wondering how, starting with a raw string 
> and a couple of variables to bind in, I could get a cte that I could join 
> against an ORM-mapped object?

uh well we don’t exactly have that, there’s a proposal to enhance text() such 
that you could give it a .c. collection with another method though I’m not 
finding that right now, which is a little odd, maybe I was showing someone on 
the ML how to do it.   it’s just another SQL construct.


Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to