I'd like to use the postgresql OVER constructions, as seen at
http://www.postgresql.org/docs/8.4/static/tutorial-window.html.

Some of the things I tried:

# gives an extra comma, which is fail.
>>> print select([s.ts,"PARTITION OVER( ts )"])
SELECT summary.ts, PARTITION OVER( ts )
FROM summary


# more sophisticated examples
http://www.sqlalchemy.org/trac/ticket/1844

None of the examples at 
http://www.sqlalchemy.org/docs/reference/ext/compiler.html
match the situation very well.

In particular, it seems hard to make new clauses like an "OVER"
clause, such that they can be easily chained onto 'Executable' things
like select(), etc.  Ideally, I'd like:

    select([some_table]).over(some_table.c.some_field).group_by(...)

To do this now, it seems to me like you have to subclass
'select' (adding an @_generative()  over()  method, and rewire the
compiler some.

Maybe I'm talking out my more foolish hole as well :)  Please correct
me if I'm overthinking this.

Gregg

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to