@contextlib.contextmanager<EOL><INDENT>def native(self, writeAccess=False, isolation_level=None):<DEDENT>
host = self.database().writeHost() if writeAccess else self.database().host()<EOL>conn = self.open(writeAccess=writeAccess)<EOL>try:<EOL><INDENT>if isolation_level is not None:<EOL><INDENT>if conn.isolation_level == isolation_level:<EOL><INDENT>isolation_level = None<EOL><DEDENT>else:<EOL><INDENT>conn.set_isolation_level(isolation_level)<EOL><DEDENT><DEDENT>yield conn<EOL><DEDENT>except Exception:<EOL><INDENT>if self._closed(conn):<EOL><INDENT>conn = None<EOL>self.close()<EOL><DEDENT>else:<EOL><INDENT>conn = self._rollback(conn)<EOL><DEDENT>raise<EOL><DEDENT>else:<EOL><INDENT>if not self._closed(conn):<EOL><INDENT>self._commit(conn)<EOL><DEDENT><DEDENT>finally:<EOL><INDENT>if conn is not None and not self._closed(conn):<EOL><INDENT>if isolation_level is not None:<EOL><INDENT>conn.set_isolation_level(isolation_level)<EOL><DEDENT>self.__pool[host].put(conn)<EOL><DEDENT><DEDENT>
Opens a new database connection to the database defined
by the inputted database.

:return     <varaint> native connection