]> git.phdru.name Git - sqlconvert.git/blobdiff - sqlconvert/process_mysql.py
Change quoting style to MySQL, PostgreSQL or SQLite
[sqlconvert.git] / sqlconvert / process_mysql.py
index 218655aa976090c7af1a79c6881ca6d35b0311e0..91ef98d66c65cd86ce93baddec518ccb980eb7f6 100644 (file)
@@ -1,6 +1,7 @@
 
 from sqlparse.sql import Comment
 from sqlparse import tokens as T
+from .process_tokens import escape_strings
 
 
 def _is_directive_token(token):
@@ -69,7 +70,8 @@ def unescape_strings(token_list):
             token.normalized = token.value = value
 
 
-def process_statement(statement):
+def process_statement(statement, quoting_style='sqlite'):
     remove_directive_tokens(statement)
     requote_names(statement)
     unescape_strings(statement)
+    escape_strings(statement, quoting_style)