cant use text() inside of select_from()
Issue #1014
resolved
generate_series = text("generate_series(:x, :y, :z) as s(a)", bindparams=[bindparam('y'), bindparam('z')](bindparam('x'),))
print select([+ literal_column("s.a")).label("dates")]((func.current_date())).select_from(generate_series)
Comments (3)
-
reporter -
reporter - changed status to resolved
f3bcc15c5ca153932a35401a3b37082eb41a9d08 removes
_TextFromClause
altogether, not sure why that was needed in the first place. Leaving the "column" use case out for now since the column contract is more involved than the from clause contract. -
reporter - removed milestone
Removing milestone: 0.4.xx (automated comment)
- Log in to comment
basically text() needs to be taken in by _literal_as_column(), select_from() etc. and turned into the appropriate construct, i.e. literal_column(),
_TextFromClause
, but preserve the bind params and typing information.