0.3.5
+- sql:
+ - the value of "case_sensitive" defaults to True now, regardless of the casing
+ of the identifier, unless specifically set to False. this is because the
+ object might be label'ed as something else which does contain mixed case, and
+ propigating "case_sensitive=False" breaks that. Other fixes to quoting
+ when using labels and "fake" column objects
- orm:
- further rework of the recent polymorphic relationship refactorings, as well
as the mechanics of relationships overall. Allows more accurate ORM behavior
the relationship.
- eager loading is slightly more strict about detecting "self-referential"
relationships, specifically between polymorphic mappers.
- - the value of "case_sensitive" defaults to True now, regardless of the casing
- of the identifier, unless specifically set to False. this is because the
- object might be label'ed as something else which does contain mixed case, and
- propigating "case_sensitive=False" breaks that.
- oracle:
- when returning "rowid" as the ORDER BY column or in use with ROW_NUMBER OVER,
oracle dialect checks the selectable its being applied to and will switch to
else:
# literal textual elements get stuck into ColumnClause alot, which shouldnt get quoted
if use_table:
- return column.table.name + "." + column.name
+ return self.format_table(column.table, use_schema=False) + "." + column.name
else:
return column.name
Column("col1", Integer))
x = select([table.c.col1.label("ImATable_col1")]).alias("SomeAlias")
assert str(select([x.c.ImATable_col1])) == '''SELECT "SomeAlias"."ImATable_col1" \nFROM (SELECT "ImATable".col1 AS "ImATable_col1" \nFROM "ImATable") AS "SomeAlias"'''
+
+ x = select([sql.column("'foo'").label("somelabel")], from_obj=[table]).alias("AnAlias")
+ x = x.select()
+ assert str(x) == '''SELECT "AnAlias".somelabel \nFROM (SELECT 'foo' AS somelabel \nFROM "ImATable") AS "AnAlias"'''
def testlabelsnocase(self):
metadata = MetaData()