]> git.phdru.name Git - sqlconvert.git/blobdiff - scripts/mysql2sql
Make process_statement() a generator
[sqlconvert.git] / scripts / mysql2sql
index f06234aeaf3ef48ede0765eb2a1e9f9f1a85ed43..3766c971ba0499fb49c9ef6d54273a7a314673a2 100755 (executable)
@@ -56,9 +56,9 @@ def main(infile, encoding, outfile, output_encoding, use_pbar, quoting_style):
             got_directive = is_directive_statement(statement)
             if got_directive:
                 continue
-            process_statement(statement, quoting_style)
-            print_tokens(statement, outfile=outfile,
-                         encoding=output_encoding)
+            for statement in process_statement(statement, quoting_style):
+                print_tokens(statement, outfile=outfile,
+                             encoding=output_encoding)
     tokens = grouper.close()
     if tokens:
         for token in tokens: