Skip to content

Commit

Permalink
Merge pull request #1192 from phenobarbital/refactor-2.7-scylladb
Browse files Browse the repository at this point in the history
remove bigquery dependency on Recordset
  • Loading branch information
phenobarbital authored Aug 7, 2024
2 parents 2414c80 + 753f4ec commit b544c7e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions asyncdb/meta/recordset.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""
from collections.abc import Sequence, Iterator
from typing import Any, Union
from google.cloud import bigquery
# from google.cloud import bigquery
from .record import Record


Expand All @@ -32,7 +32,8 @@ def get_result(self) -> Any:
def from_result(cls, result: Iterator) -> "Recordset":
cols = []
try:
if isinstance(result, bigquery.table.RowIterator):
# if isinstance(result, bigquery.table.RowIterator):
if hasattr(result, 'job_id'): # BigQuery Row Iterator
rows_list = [row for row in result]
result = [{key: value for key, value in row.items()} for row in rows_list]
cols = list(result[0].keys())
Expand Down
2 changes: 1 addition & 1 deletion asyncdb/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
__title__ = "asyncdb"
__description__ = "Library for Asynchronous data source connections \
Collection of asyncio drivers."
__version__ = "2.7.17"
__version__ = "2.7.18"
__author__ = "Jesus Lara"
__author_email__ = "[email protected]"
__license__ = "BSD"

0 comments on commit b544c7e

Please sign in to comment.