From: Oleg Broytman Date: Fri, 3 Nov 2017 22:32:55 +0000 (+0300) Subject: Refactor(process_mysql): Get DML type X-Git-Tag: 0.2.3~36 X-Git-Url: https://git.phdru.name/?p=sqlconvert.git;a=commitdiff_plain;h=b72239847f13152061182973ea573dd2e835a89e Refactor(process_mysql): Get DML type --- diff --git a/sqlconvert/process_mysql.py b/sqlconvert/process_mysql.py index e99ea79..fad7e4c 100644 --- a/sqlconvert/process_mysql.py +++ b/sqlconvert/process_mysql.py @@ -147,10 +147,10 @@ def process_statement(statement, dbname='sqlite'): remove_directive_tokens(statement) escape_strings(statement, dbname) try: - is_insert = get_DML_type(statement) == 'INSERT' + dml_type = get_DML_type(statement) except ValueError: - is_insert = False - if is_insert: + dml_type = 'UNKNOWN' + if dml_type == 'INSERT': for statement in split_ext_insert(statement): yield statement else: