Skip to content

Commit fa5a36f

Browse files
committed
docs(Connection, handle_DATA_ROW): add doc-string
1 parent 821adb5 commit fa5a36f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

redshift_connector/core.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -1321,10 +1321,15 @@ def handle_COMMAND_COMPLETE(self: "Connection", data: bytes, cursor: Cursor) ->
13211321
self.close_prepared_statement(ps["statement_name_bin"])
13221322
pcache["ps"].clear()
13231323

1324-
# Get the data respond from database
1325-
# transform the Redshift data tye into python data type
1326-
# store the data into _cached_rows
13271324
def handle_DATA_ROW(self: "Connection", data: bytes, cursor: Cursor) -> None:
1325+
"""
1326+
Processes incoming data rows from Amazon Redshift into Python data types, storing the transformed row in the cursor object's `_cached_rows`.
1327+
:param data: bytearray
1328+
The raw bytes sent by the Amazon Redshift server.
1329+
:param cursor: `Cursor`
1330+
The `Cursor` object associated with the given statements execution.
1331+
:return: None
1332+
"""
13281333
data_idx: int = 2
13291334
row: typing.List = []
13301335
for desc in cursor.truncated_row_desc():

0 commit comments

Comments
 (0)