File size: 793 Bytes
4c9a5ed |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
def remove_triple_quotes(sql_query):
print('the incoming sql_query is :\n', sql_query)
if sql_query.startswith('"""') and sql_query.endswith('"""'):
sql_query = sql_query[3:-3].strip()
print('the outgoing sql_query is :\n', sql_query)
return sql_query
elif sql_query.startswith("'''") and sql_query.endswith("'''"):
sql_query = sql_query[3:-3].strip()
print('the outgoing sql_query is :\n', sql_query)
return sql_query
elif sql_query.startswith("```") and sql_query.endswith("```"):
sql_query = sql_query[3:-3].strip()
print('the outgoing sql_query is :\n', sql_query)
return sql_query
else:
print('the outgoing sql_query is :\n', sql_query)
return sql_query
|