File tree 3 files changed +9
-1
lines changed
3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ Bug Fixes
23
23
* Fix parsing of nested order clauses (issue745, pr746 by john-bodley).
24
24
* Thread-safe initialization of Lexer class (issue730).
25
25
* Classify TRUNCATE as DDL and GRANT/REVOKE as DCL keywords (based on pr719
26
- by josuc1, thanks for bringing this up!)
26
+ by josuc1, thanks for bringing this up!).
27
+ * Fix parsing of PRIMARY KEY (issue740).
27
28
28
29
29
30
Release 0.4.4 (Apr 18, 2023)
Original file line number Diff line number Diff line change 77
77
(r'DOUBLE\s+PRECISION\b' , tokens .Name .Builtin ),
78
78
(r'GROUP\s+BY\b' , tokens .Keyword ),
79
79
(r'ORDER\s+BY\b' , tokens .Keyword ),
80
+ (r'PRIMARY\s+KEY\b' , tokens .Keyword ),
80
81
(r'HANDLER\s+FOR\b' , tokens .Keyword ),
81
82
(r'GO(\s\d+)\b' , tokens .Keyword ),
82
83
(r'(LATERAL\s+VIEW\s+)'
Original file line number Diff line number Diff line change @@ -444,3 +444,9 @@ def test_copy_issue672():
444
444
p = sqlparse .parse ('select * from foo' )[0 ]
445
445
copied = copy .deepcopy (p )
446
446
assert str (p ) == str (copied )
447
+
448
+
449
+ def test_primary_key_issue740 ():
450
+ p = sqlparse .parse ('PRIMARY KEY' )[0 ]
451
+ assert len (p .tokens ) == 1
452
+ assert p .tokens [0 ].ttype == T .Keyword
You can’t perform that action at this time.
0 commit comments