ClauseList as a column_property

Issue #798 resolved
Former user created an issue

As described in the clauselist as a column_property group mail, the current version doesn't allow ClauseLists as a column property.

Comments (6)

  1. Mike Bayer repo owner

    the orig_set() thing is probably not needed here.

    but im thinking that it may be more appropriate here to just have and_(), or_(), etc. return a _CalculatedClause instead of ClauseList. since i think that object is already designed to handle the "list of items which can act like a column" use-case (i.e. it has a "type_" parameter, etc.)

    of top importance here is that we have some small test cases. such as:

       x = and_(a, b, c)
       assert x.type is types.Boolean
       assert str(x) == 'a AND b AND c'
       assert str(select([x.label('foo')](x.label('foo')))) == 'SELECT (a AND b AND c) AS foo'
    

    etc.

  2. Log in to comment