How the db connection is being closed in oracle backend

Hi Team,

I am working on the PR. I want to understand how the db connection is being closed. I can see in the file django/django/db/backends/base/base.py at main · django/django · GitHub in line number 351 we are calling _close() inside the close() method which is closing the connection. Am i right ?

If i am right then in case of oracle backend i am seeing that the close() method is being overridden in line number 589 django/django/db/backends/base/base.py at main · django/django · GitHub and this close() method in not calling _close(). Then how the connection will get closed in case of oracle backend.

You are mixing up cursors and connections.

Isn’t this the code which is closing the connection

def _close(self):
        if self.connection is not None:
            with self.wrap_database_errors:
                return self.connection.close()