summaryrefslogtreecommitdiff
path: root/sqlparse
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2010-11-21 19:42:57 +0100
committerAndi Albrecht <albrecht.andi@gmail.com>2010-11-21 19:42:57 +0100
commita0bafb0929ce7cee6ce38b368d96f3ae0ae98b25 (patch)
treeb83aa1f7b8502a20220571a77153b087f3531146 /sqlparse
parentb56308b44ac5f60b757c576fdea4f91c5e215898 (diff)
downloadsqlparse-a0bafb0929ce7cee6ce38b368d96f3ae0ae98b25.tar.gz
Ignore identifiers in double-quotes when changing identifier case (fixes issue21).
Diffstat (limited to 'sqlparse')
-rw-r--r--sqlparse/filters.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/sqlparse/filters.py b/sqlparse/filters.py
index a3ae192..9d1e0b9 100644
--- a/sqlparse/filters.py
+++ b/sqlparse/filters.py
@@ -45,6 +45,12 @@ class KeywordCaseFilter(_CaseFilter):
class IdentifierCaseFilter(_CaseFilter):
ttype = (T.Name, T.String.Symbol)
+ def process(self, stack, stream):
+ for ttype, value in stream:
+ if ttype in self.ttype and not value.strip()[0] == '"':
+ value = self.convert(value)
+ yield ttype, value
+
# ----------------------
# statement process