Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions mssql_python/cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2013,7 +2013,10 @@ def columns(self, table=None, catalog=None, schema=None, column=None):
# Use the helper method to prepare the result set
return self._prepare_metadata_result_set(fallback_description=fallback_description)

def _transpose_rowwise_to_columnwise(self, seq_of_parameters: list) -> tuple[list, int]:
def _transpose_rowwise_to_columnwise(
self,
seq_of_parameters: Sequence[Sequence[Any]],
) -> tuple[list, int]:
"""
Convert sequence of rows (row-wise) into list of columns (column-wise),
for array binding via ODBC. Works with both iterables and generators.
Expand Down Expand Up @@ -2131,7 +2134,9 @@ def _compute_column_type(self, column):
return sample_value, None, None, max_decimal_formatted_len

def executemany( # pylint: disable=too-many-locals,too-many-branches,too-many-statements
self, operation: str, seq_of_parameters: Union[List[Sequence[Any]], List[Mapping[str, Any]]]
self,
operation: str,
seq_of_parameters: Union[Sequence[Sequence[Any]], Sequence[Mapping[str, Any]]],
Comment thread
bewithgaurav marked this conversation as resolved.
) -> None:
"""
Prepare a database operation and execute it against all parameter sequences.
Expand Down
4 changes: 3 additions & 1 deletion mssql_python/mssql_python.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ class Cursor:
reset_cursor: bool = True,
) -> "Cursor": ...
def executemany(
self, operation: str, seq_of_parameters: Union[List[Sequence[Any]], List[Mapping[str, Any]]]
self,
operation: str,
seq_of_parameters: Union[Sequence[Sequence[Any]], Sequence[Mapping[str, Any]]],
) -> None: ...
def fetchone(self) -> Optional[Row]: ...
def fetchmany(self, size: Optional[int] = None) -> List[Row]: ...
Expand Down
Loading