You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrated issue, originally created by Michael Bayer (@zzzeek)
def test_named_alias_no_quote(self):
cte = select([literal(1).label("id")]).cte(name='CTE')
s1 = select([cte.c.id]).alias(name="no_quotes")
s = select([s1])
self.assert_compile(
s,
'WITH "CTE" AS (SELECT :param_1 AS id) '
'SELECT no_quotes.id FROM '
'(SELECT "CTE".id AS id FROM "CTE") AS no_quotes'
)
def test_named_alias_quote(self):
cte = select([literal(1).label("id")]).cte(name='CTE')
s1 = select([cte.c.id]).alias(name="Quotes Required")
s = select([s1])
self.assert_compile(
s,
'WITH "CTE" AS (SELECT :param_1 AS id) '
'SELECT "Quotes Required".id FROM '
'(SELECT "CTE".id AS id FROM "CTE") AS "Quotes Required"'
)
The text was updated successfully, but these errors were encountered:
Fixed bug where CTE expressions would not have their name or alias name
quoted when the given name is case sensitive or otherwise requires quoting.
Pull request courtesy Eric Atkin.
Migrated issue, originally created by Michael Bayer (@zzzeek)
The text was updated successfully, but these errors were encountered: