diff options
| author | Yago Riveiro <yago.riveiro@gmail.com> | 2013-04-25 15:21:44 +0100 |
|---|---|---|
| committer | Yago Riveiro <yago.riveiro@gmail.com> | 2013-04-25 15:21:44 +0100 |
| commit | 572b69c1e630506d81ef594b15febc37bb011318 (patch) | |
| tree | 0b9ba96e0bff162dd59dbac3f6f944cc5e3da932 /sqlparse | |
| parent | fd480bf40646cdb53bce377db5d11dc52a760dad (diff) | |
| download | sqlparse-572b69c1e630506d81ef594b15febc37bb011318.tar.gz | |
Added STRAIGHT_JOIN token.
Diffstat (limited to 'sqlparse')
| -rw-r--r-- | sqlparse/filters.py | 2 | ||||
| -rw-r--r-- | sqlparse/keywords.py | 1 | ||||
| -rw-r--r-- | sqlparse/lexer.py | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/sqlparse/filters.py b/sqlparse/filters.py index fdb32ac..c6506eb 100644 --- a/sqlparse/filters.py +++ b/sqlparse/filters.py @@ -271,7 +271,7 @@ class ReindentFilter: return sql.Token(T.Whitespace, ws) def _split_kwds(self, tlist): - split_words = ('FROM', 'JOIN$', 'AND', 'OR', + split_words = ('FROM', 'STRAIGHT_JOIN$', 'JOIN$', 'AND', 'OR', 'GROUP', 'ORDER', 'UNION', 'VALUES', 'SET', 'BETWEEN') diff --git a/sqlparse/keywords.py b/sqlparse/keywords.py index ed741d4..92a0b58 100644 --- a/sqlparse/keywords.py +++ b/sqlparse/keywords.py @@ -536,6 +536,7 @@ KEYWORDS_COMMON = { 'FROM': tokens.Keyword, 'INNER': tokens.Keyword, 'JOIN': tokens.Keyword, + 'STRAIGHT_JOIN': tokens.Keyword, 'AND': tokens.Keyword, 'OR': tokens.Keyword, 'LIKE': tokens.Keyword, diff --git a/sqlparse/lexer.py b/sqlparse/lexer.py index 4d200a6..dd6ecc0 100644 --- a/sqlparse/lexer.py +++ b/sqlparse/lexer.py @@ -196,7 +196,7 @@ class Lexer(object): # 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'(LEFT |RIGHT )?(INNER |OUTER |STRAIGHT)?JOIN\b', tokens.Keyword), (r'END( IF| LOOP)?\b', tokens.Keyword), (r'NOT NULL\b', tokens.Keyword), (r'CREATE( OR REPLACE)?\b', tokens.Keyword.DDL), |
