async def update(
        self,
        db: AsyncSession,
        *,
        db_obj: Connection,
        obj_in: Union[ConnectionUpdate, dict[str, Any]],
        current_user: User,
        uow: Optional[UnitOfWork] = None,
    ) -> Connection:
        """Update a connection, with special handling for native connections.

        Native connections cannot be updated as they are system-level resources.

        Args:
        ----
            db (AsyncSession): The database session.
            db_obj (Connection): The connection to update.
            obj_in (Union[ConnectionUpdate, dict[str, Any]]): The new connection data.
            current_user (User): The current user.
            uow (Optional[UnitOfWork]): The unit of work to use for the transaction.

        Returns:
        -------
            Connection: The updated connection.

        Raises:
        ------
            PermissionException: If attempting to update a native connection or if the user
                does not have permission to update the connection.
        """
        # Prevent updates to native connections
        if self._is_native_connection(db_obj):
            raise PermissionException(
                "Native connections cannot be updated as they are system-level resources"
            )

        # For regular connections, proceed with the normal update
        return await super().update(
            db=db, db_obj=db_obj, obj_in=obj_in, current_user=current_user, uow=uow
        )
Update a connection, with special handling for native connections.

        Native connections cannot be updated as they are system-level resources.

        Args:
        ----
            db (AsyncSession): The database session.
            db_obj (Connection): The connection to update.
            obj_in (Union[ConnectionUpdate, dict[str, Any]]): The new connection data.
            current_user (User): The current user.
            uow (Optional[UnitOfWork]): The unit of work to use for the transaction.

        Returns:
        -------
            Connection: The updated connection.

        Raises:
        ------
            PermissionException: If attempting to update a native connection or if the user
                does not have permission to update the connection.
        
backend/airweave/crud/crud_connection.py