On Jun 21, 2011, at 5:02 PM, Filip Zyzniewski - Tefnet wrote: > Dnia 2011-06-21, wto o godzinie 15:58 -0400, Michael Bayer pisze: >> also note you can do this stuff without a patch with the @compiles >> decorator, if you just need to get something done. you'd redefine >> compilation for CreateIndex. > > I think it fails before compiling (I have included a backtrace in the > first post). > > sqlalchemy.schema.Index is derived from > sqlalchemy.schema.ColumnCollectionMixin, whose column attribute > (sqlalchemy.sql.expression.ColumnCollection) seems to assume (not > surprisingly), that items added to it are columns. > > Should I create the index object in some other way? > Maybe my own index class?
yeah you can subclass Index. but also I think the feature add is fine. To be committed it needs tests, as this is a generic feature it could probably go into test/sql/test_constraints.py using assert_compile() with CreateIndex. Or I'll eventually get around to it... -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
