Skip to content

Commit

Permalink
introduce PEP 479 support to native driver
Browse files Browse the repository at this point in the history
  • Loading branch information
Kim Gustyr committed Aug 29, 2018
1 parent 2c27d20 commit f3bb4da
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions clickhouse_sqlalchemy/drivers/native/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,16 +217,12 @@ def setoutputsize(self, size, column=None):
pass

# Iteration support.
def __next__(self):
one = self.fetchone()
if one is None:
raise StopIteration
return one

next = __next__

def __iter__(self):
return self
while True:
one = self.fetchone()
if one is None:
return
yield one

def _process_response(self, response, context):
if not response:
Expand Down

0 comments on commit f3bb4da

Please sign in to comment.