summaryrefslogtreecommitdiff
path: root/sqlparse
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2011-08-09 16:04:40 +0200
committerAndi Albrecht <albrecht.andi@gmail.com>2011-08-09 16:04:40 +0200
commit5d015084e5bf640f41c8d93c89d2ff70c0967c2b (patch)
treecfa3b58e11e49a6266a2a05ab9e477c5d62c5024 /sqlparse
parenta8b46d3b96ead22263de782b36090f2f1bc7c15d (diff)
parent530da46905753a1e950bcc7e736d72a7309033c6 (diff)
downloadsqlparse-5d015084e5bf640f41c8d93c89d2ff70c0967c2b.tar.gz
merge
Diffstat (limited to 'sqlparse')
-rw-r--r--sqlparse/__init__.py2
-rw-r--r--sqlparse/lexer.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/sqlparse/__init__.py b/sqlparse/__init__.py
index 903fdd1..7698e46 100644
--- a/sqlparse/__init__.py
+++ b/sqlparse/__init__.py
@@ -6,7 +6,7 @@
"""Parse SQL statements."""
-__version__ = '0.1.2'
+__version__ = '0.1.3'
class SQLParseError(Exception):
diff --git a/sqlparse/lexer.py b/sqlparse/lexer.py
index 950ef1b..8929e3e 100644
--- a/sqlparse/lexer.py
+++ b/sqlparse/lexer.py
@@ -150,7 +150,7 @@ class LexerMeta(type):
return type.__call__(cls, *args, **kwds)
-class Lexer:
+class Lexer(object):
__metaclass__ = LexerMeta
@@ -189,6 +189,7 @@ class Lexer:
(r"(''|'.*?[^\\]')", tokens.String.Single),
# not a real string literal in ANSI SQL:
(r'(""|".*?[^\\]")', tokens.String.Symbol),
+ (r'(\[.*[^\]]\])', tokens.Name),
(r'(LEFT |RIGHT )?(INNER |OUTER )?JOIN\b', tokens.Keyword),
(r'END( IF| LOOP)?\b', tokens.Keyword),
(r'NOT NULL\b', tokens.Keyword),