Michael Bayer schrieb:
> use the "prefixes" argument to select() for this.
>
thanks very much.
it it possible to use this somehow with session.query?
I do not use select at all, but do construct the queries dynamically like so:
q = session.query(tblNewsletteremail)
c = tblNewsletteremail.__table__.c
for k,v in info.items():
if isinstance(v, tuple):
op, v = v
if op == 'like':
q = q.filter(c[k].like('%' + v + '%'))
if op == 'in':
q = q.filter(c[k].in_(v))
else:
q = q.filter(c[k] == v)
if order_by:
for e in order_by:
q = q.order_by(c[e])
if limit:
q = q.limit(limit)
result = q.all()
now I would like to "apply" SQL_CALC_FOUND_ROWS to the query object before
executing it. is this possible?
thanks again
robert