code: def _pre_add_update(self, database: Database) -> None:
      if app.config["PREVENT_UNSAFE_DB_CONNECTIONS"]:
          check_sqlalchemy_uri(make_url_safe(database.sqlalchemy_uri))
      self.check_extra(database)
      self.check_encrypted_extra(database)
      if database.server_cert:
          utils.parse_ssl_cert(database.server_cert)
      database.set_sqlalchemy_uri(database.sqlalchemy_uri)
      security_manager.add_permission_view_menu(
          "database_access", database.perm
      )
      # adding a new database we always want to force refresh schema list
      for schema in database.get_all_schema_names():
          security_manager.add_permission_view_menu(
              "schema_access",
              security_manager.get_schema_perm(database, schema),
          )
  
file_path: superset/superset/views/database/mixins.py
imports: import inspect
  from flask import Markup
  from flask_babel import lazy_gettext
  from sqlalchemy import MetaData
  from superset import app, security_manager
  from superset.databases.filters import DatabaseFilter
  from superset.databases.utils import make_url_safe
  from superset.exceptions import SupersetException
  from superset.models.core import Database
  from superset.security.analytics_db_safety import check_sqlalchemy_uri
  from superset.utils import core
label_desc: Use image node_id 1 for calling the DatabaseMixin obj's underlying member method code with example usage: obj._pre_add_update(database) without return types