async def remove(
        self,
        db: AsyncSession,
        *,
        id: UUID,
        current_user: User,
        uow: Optional[UnitOfWork] = None,
    ) -> Optional[Connection]:
        """Delete a connection, with special handling for native connections.

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

        Args:
        ----
            db (AsyncSession): The database session.
            id (UUID): The UUID of the connection to delete.
            current_user (User): The current user.
            uow (Optional[UnitOfWork]): The unit of work to use for the transaction.

        Returns:
        -------
            Optional[Connection]: The deleted connection.

        Raises:
        ------
            PermissionException: If attempting to delete a native connection or if the user
                does not have permission to delete the connection.
        """
        query = select(self.model).where(self.model.id == id)
        result = await db.execute(query)
        db_obj = result.unique().scalar_one_or_none()

        if db_obj is None:
            return None

        # Prevent deletion of native connections
        if self._is_native_connection(db_obj):
            raise PermissionException(
                "Native connections cannot be deleted as they are system-level resources"
            )

        # For regular connections, validate user permissions
        self._validate_if_user_has_permission(db_obj, current_user)

        await db.delete(db_obj)

        if not uow:
            await db.commit()

        return db_obj
Delete a connection, with special handling for native connections.

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

        Args:
        ----
            db (AsyncSession): The database session.
            id (UUID): The UUID of the connection to delete.
            current_user (User): The current user.
            uow (Optional[UnitOfWork]): The unit of work to use for the transaction.

        Returns:
        -------
            Optional[Connection]: The deleted connection.

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