docstr: Unmask ``encrypted_extra`` before updating.
  
  When a database is edited the user sees a masked version of ``encrypted_extra``,
  depending on the engine spec. Eg, BigQuery will mask the ``private_key`` attribute
  of the credentials.
  
  The masked values should be unmasked before the database is updated.
docstr_tok: ["Unmask","``","encrypted_extra","``","before","updating",".","When","a","database","is","edited","the","user","sees","a","masked","version","of","``","encrypted_extra","``",",","depending","on","the","engine","spec",".","Eg",",","BigQuery","will","mask","the","``","private_key","``","attribute","of","the","credentials",".","The","masked","values","should","be","unmasked","before","the","database","is","updated","."]
code: def update(
      cls,
      item: Database | None = None,
      attributes: dict[str, Any] | None = None,
      commit: bool = True,
  ) -> Database:
      """
      Unmask ``encrypted_extra`` before updating.
  
      When a database is edited the user sees a masked version of ``encrypted_extra``,
      depending on the engine spec. Eg, BigQuery will mask the ``private_key`` attribute
      of the credentials.
  
      The masked values should be unmasked before the database is updated.
      """
  
      if item and attributes and "encrypted_extra" in attributes:
          attributes[
              "encrypted_extra"
          ] = item.db_engine_spec.unmask_encrypted_extra(
              item.encrypted_extra,
              attributes["encrypted_extra"],
          )
  
      return super().update(item, attributes, commit)
  
imports: from __future__ import annotations
  import logging
  from typing import Any
  from superset.daos.base import BaseDAO
  from superset.databases.filters import DatabaseFilter
  from superset.databases.ssh_tunnel.models import SSHTunnel
  from superset.extensions import db
  from superset.models.core import Database
  from superset.models.dashboard import Dashboard
  from superset.models.slice import Slice
  from superset.models.sql_lab import TabState
  from superset.utils.core import DatasourceType
  from superset.utils.ssh_tunnel import unmask_password_info
label_desc: Use image node_id 1 for calling the DatabaseDAO obj's underlying member method code with example usage: obj.update(cls, item, attributes, commit) and returns: super