Closes the connection via the core's close method.

    :param commit: if true the current transaction is commited, otherwise it is rolled back
    :type commit: boolean
    :return: self

def close(self, *, commit=True):
    """Closes the connection via the core's close method.

    :param commit: if true the current transaction is commited, otherwise it is rolled back
    :type commit: boolean
    :return: self
    """
    self.core.close(self.connection, commit=commit)
    self.connection = None
    return self