diff options
author | Victor Hahn <info@victor-hahn.de> | 2013-10-29 16:35:12 +0100 |
---|---|---|
committer | Victor Hahn <info@victor-hahn.de> | 2013-10-29 16:35:12 +0100 |
commit | 22a1f4ae7bad8740e554b73a6b01e8451cb68f33 (patch) | |
tree | 8957d92e0149ede9d430e4ce6ab99ad42a0ff522 | |
parent | 1acf52dc96f595d972375c0f2a185a668929a211 (diff) | |
download | sqlparse-22a1f4ae7bad8740e554b73a6b01e8451cb68f33.tar.gz |
Update keywords.py
delare BEGIN, START, COMMIT and ROLLBACK as DML keywords to allow sqlparse to be used to identify transactions
-rw-r--r-- | sqlparse/keywords.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sqlparse/keywords.py b/sqlparse/keywords.py index bbf3c6b..f1d76d0 100644 --- a/sqlparse/keywords.py +++ b/sqlparse/keywords.py @@ -29,7 +29,7 @@ KEYWORDS = { 'BACKWARD': tokens.Keyword, 'BEFORE': tokens.Keyword, - 'BEGIN': tokens.Keyword, + 'BEGIN': tokens.Keyword.DML, 'BETWEEN': tokens.Keyword, 'BITVAR': tokens.Keyword, 'BIT_LENGTH': tokens.Keyword, @@ -73,7 +73,7 @@ KEYWORDS = { 'COMMAND_FUNCTION': tokens.Keyword, 'COMMAND_FUNCTION_CODE': tokens.Keyword, 'COMMENT': tokens.Keyword, - 'COMMIT': tokens.Keyword, + 'COMMIT': tokens.Keyword.DML, 'COMMITTED': tokens.Keyword, 'COMPLETION': tokens.Keyword, 'CONDITION_NUMBER': tokens.Keyword, @@ -355,7 +355,7 @@ KEYWORDS = { 'REVOKE': tokens.Keyword, 'RIGHT': tokens.Keyword, 'ROLE': tokens.Keyword, - 'ROLLBACK': tokens.Keyword, + 'ROLLBACK': tokens.Keyword.DML, 'ROLLUP': tokens.Keyword, 'ROUTINE': tokens.Keyword, 'ROUTINE_CATALOG': tokens.Keyword, @@ -401,7 +401,7 @@ KEYWORDS = { 'SQLSTATE': tokens.Keyword, 'SQLWARNING': tokens.Keyword, 'STABLE': tokens.Keyword, - 'START': tokens.Keyword, + 'START': tokens.Keyword.DML, 'STATE': tokens.Keyword, 'STATEMENT': tokens.Keyword, 'STATIC': tokens.Keyword, |