Skip to content

There is issue with commit and rollback these 2 methods in asynch scenario #386

@flyly0755

Description

@flyly0755

https://github.com/xzkostyan/clickhouse-sqlalchemy/blob/3dc8df9da598ac51e20e9b7bb110ae97e250fab7/clickhouse_sqlalchemy/drivers/asynch/connector.py#L178C1-L183C1

def rollback(self):
      self.await_(self._connection.rollback())

def commit(self):
      self.await_(self._connection.commit())

Because ClickHouse does not support transaction, then will raise error:

xxx\asynch\connection.py", line 181, in commit
    raise NotSupportedError
asynch.errors.NotSupportedError: Code: None.

The report issue in asynch can check link as below:
long2ice/asynch#91

I have check both methods in http/connector.py and native/connector.py, with pass label as below

def commit(self):
        pass

    def rollback(self):
        pass

https://github.com/xzkostyan/clickhouse-sqlalchemy/blob/3dc8df9da598ac51e20e9b7bb110ae97e250fab7/clickhouse_sqlalchemy/drivers/http/connector.py#L44C5-L48C13
https://github.com/xzkostyan/clickhouse-sqlalchemy/blob/3dc8df9da598ac51e20e9b7bb110ae97e250fab7/clickhouse_sqlalchemy/drivers/native/connector.py#L42C4-L46C13

So these 2 methods in asynch/connector.py maybe also need to change as pass?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions