Skip to content

Commit

Permalink
docs(Connection, handle_DATA_ROW): add doc-string
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooke-white committed Jul 19, 2021
1 parent 821adb5 commit fa5a36f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions redshift_connector/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1321,10 +1321,15 @@ def handle_COMMAND_COMPLETE(self: "Connection", data: bytes, cursor: Cursor) ->
self.close_prepared_statement(ps["statement_name_bin"])
pcache["ps"].clear()

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

0 comments on commit fa5a36f

Please sign in to comment.