cant use text() inside of select_from()

Issue #1014 resolved
Mike Bayer repo owner created an issue
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)

  1. Mike Bayer reporter

    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.

  2. Log in to comment