summaryrefslogtreecommitdiff
path: root/sqlparse/lexer.py
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2009-04-29 21:18:03 +0200
committerAndi Albrecht <albrecht.andi@gmail.com>2009-04-29 21:18:03 +0200
commit1fd167879df0a65ec2cc2bcf023ca3b45cff8d9c (patch)
tree48d9bd72929695e7954cd7dbb7359440d348bc45 /sqlparse/lexer.py
parentf5444736afcad8cd55a30027b1df2fca0d9eb0b2 (diff)
downloadsqlparse-1fd167879df0a65ec2cc2bcf023ca3b45cff8d9c.tar.gz
Recognize backticks quoting identifiers.
Diffstat (limited to 'sqlparse/lexer.py')
-rw-r--r--sqlparse/lexer.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/sqlparse/lexer.py b/sqlparse/lexer.py
index b635fc6..dcac401 100644
--- a/sqlparse/lexer.py
+++ b/sqlparse/lexer.py
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+
# Copyright (C) 2008 Andi Albrecht, albrecht.andi@gmail.com
#
# This module is part of python-sqlparse and is released under
@@ -162,6 +164,8 @@ class Lexer:
(r':=', Assignment),
(r'::', Punctuation),
(r'[*]', Wildcard),
+ (r"`(``|[^`])*`", Name),
+ (r"´(´´|[^´])*´", Name),
(r'[+/<>=~!@#%^&|`?^-]', Operator),
(r'[0-9]+', Number.Integer),
# TODO: Backslash escapes?