lets first take the "name" parameter out of CalculatedClause since it doesnt even seem to be used,  make a subclass of CalculatedClause called "ExpressionClause", make a function "_expression_" to create one, give it an optional keyword-based "name" parameter, and have its visit_expression method in the ANSI compiler do something similar to the CalculatedClause/label pair you have below.  if no name, it generates one similar to how an Alias does it.


On May 17, 2006, at 8:10 AM, Gambit wrote:

 valid_clause = and_(source.c.ts >= from_ts)

   items = select([sql.CalculatedClause('lbl', valid_clause).label('lbl'), ...


Reply via email to