def METHOD_NAME(raw: str, engine: Engine) -> str:
    """
    String cleaning for SQL parsing.
    Logic is different between MySQL and Postgres
    - descriptions/comments with single quotes, e.g., `Mysql's data`.
      get converted to `Mysql''s data`
    - To insert a literal backlash in MySQL you need to escape with another one. This applies for `\n` and `\"` in
      inner JSONs for a field. This is not required for postgres
    """
    quoted_str = raw.replace("'", "''")
    if engine.name == MYSQL_ENGINE_NAME:
        quoted_str = quoted_str.replace("\\", "\\\\")
    return quoted_str