Skip to content

Commit dc7bdea

Browse files
committed
Fixes
1 parent 91a13e0 commit dc7bdea

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ydb_sqlalchemy/dbapi/cursor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def executescript(self, script):
304304
return self.execute(script)
305305

306306
def fetchone(self):
307-
return next(self.rows or [], None)
307+
return next(self.rows or iter([]), None)
308308

309309
def fetchmany(self, size=None):
310310
return list(itertools.islice(self.rows, size or self.arraysize))

ydb_sqlalchemy/sqlalchemy/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ def _get_column_info(t):
560560

561561
class YdbScanQueryCharacteristic(characteristics.ConnectionCharacteristic):
562562
def reset_characteristic(self, dialect: "YqlDialect", dbapi_connection: dbapi.Connection) -> None:
563-
dialect.reset_isolation_level(dbapi_connection)
563+
dialect.reset_ydb_scan_query(dbapi_connection)
564564

565565
def set_characteristic(self, dialect: "YqlDialect", dbapi_connection: dbapi.Connection, value: bool) -> None:
566566
dialect.set_ydb_scan_query(dbapi_connection, value)
@@ -745,7 +745,7 @@ def get_isolation_level(self, dbapi_connection: dbapi.Connection) -> str:
745745
def set_ydb_scan_query(self, dbapi_connection: dbapi.Connection, value: bool) -> None:
746746
dbapi_connection.set_ydb_scan_query(value)
747747

748-
def reset_isolation_level(self, dbapi_connection: dbapi.Connection):
748+
def reset_ydb_scan_query(self, dbapi_connection: dbapi.Connection):
749749
self.set_ydb_scan_query(dbapi_connection, False)
750750

751751
def get_ydb_scan_query(self, dbapi_connection: dbapi.Connection) -> str:

0 commit comments

Comments
 (0)