From: Mike Bayer Date: Wed, 28 Aug 2013 14:16:28 +0000 (-0400) Subject: comment this alternative approach... X-Git-Tag: rel_0_9_0b1~87 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c7adc32c09b106ecc16af97af5a69d85ce2a8d1e;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git comment this alternative approach... --- diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py index 99dd193f3f..92cbc36533 100644 --- a/lib/sqlalchemy/sql/elements.py +++ b/lib/sqlalchemy/sql/elements.py @@ -2143,9 +2143,15 @@ class quoted_name(util.text_type): """ + #def __new__(cls, value, quote, sprcls=False): def __new__(cls, value, quote): if value is None: return None + # experimental - don't bother with quoted_name + # if quote flag is None. doesn't seem to make any dent + # in performance however + # elif not sprcls and quote is None: + # return value elif isinstance(value, cls) and ( quote is None or value.quote == quote ): @@ -2180,6 +2186,7 @@ class _truncated_label(quoted_name): def __new__(cls, value, quote=None): quote = getattr(value, "quote", quote) + #return super(_truncated_label, cls).__new__(cls, value, quote, True) return super(_truncated_label, cls).__new__(cls, value, quote) def __reduce__(self):