class_docstr: SQL connectors are used to connect to SQL databases in different dialects.
class_docstr_tok: ["SQL","connectors","are","used","to","connect","to","SQL","databases","in","different","dialects","."]
code: def _is_sql_query_safe(self, query: str):
      infected_keywords = [
          r"\bINSERT\b",
          r"\bUPDATE\b",
          r"\bDELETE\b",
          r"\bDROP\b",
          r"\bEXEC\b",
          r"\bALTER\b",
          r"\bCREATE\b",
      ]
  
      return not any(
          re.search(keyword, query, re.IGNORECASE)
          for keyword in infected_keywords
      )
  
imports: import re
  import os
  import pandas
  from pandasai.exceptions import MaliciousQueryError
  from .base import BaseConnector, SQLConnectorConfig, SqliteConnectorConfig
  from .base import BaseConnectorConfig
  from sqlalchemy import create_engine, text, select, asc
  from sqlalchemy.engine import Connection
  from functools import cached_property, cache
  import hashlib
  from ..helpers.path import find_project_root
  from ..constants import DEFAULT_FILE_PERMISSIONS
  from typing import Union
  import time
label_desc: Use image node_id 19 for calling the SQLConnector obj's underlying member method code with example usage: obj._is_sql_query_safe(query) and returns: unknown