What do you think about the pattern I've implemented for this purpose using
metaclasses?
https://gist.github.com/aelaguiz/7691751
I've also pasted the code here but it's nicer to look at on github via the
link above:
import logging
import sqlalchemy as sqla
import sqlalchemy.ext.declarative
if it works, that’s fine. as far as metaclasses I like to recommend using
SQLAlchemy class instrumentation events instead so that there’s no complication
re: declarative’s own metaclass and such.
On Nov 28, 2013, at 8:24 AM, Amir Elaguizy aelag...@gmail.com wrote:
What do you think about
SQLAlchemy doesn’t yet have date arithmetic functions built in to the point
that we abstract away the underlying database features.
Date arithmetic currently relies on the end-user implementing the SQL using
exactly the functions that the target database expects. These vary completely
on all
Hi Mike,
Happy Thanksgiving :-)
On 22/11/2013 15:55, Michael Bayer wrote:
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
On Nov 28, 2013, at 7:54 PM, Chris Withers ch...@simplistix.co.uk wrote:
So far, I got:
inst = aliased(Part)
unit = aliased(Part)
query = session.query(
inst.idea_id,
inst.instrument_id,
func.sum(inst.quantity),