FEAT: Explicit parameters and improved type hints for bulkcopy by bewithgaurav · Pull Request #420 · microsoft/mssql-python
…IDE discoverability - All options now explicit in function signature - Pass params directly to pycore (no kwargs dict conversion) - Matches mssql-tds explicit params API Based on community feedback from discussion #414
Copilot AI review requested due to automatic review settings
January 30, 2026 12:40After Saurabh's review, Rust bulkcopy now uses direct types (bool, usize) instead of Option<T>. Python must not pass None values - instead omit the kwarg and let PyO3 use its defaults.
- batch_size: int = 0 (0 means server optimal) - timeout: int = 30 - column_mappings: Optional[Union[List[str], List[Tuple[int, str]]]] = None - All boolean flags: bool = False (not Optional[bool] = None) Updated docstring with two column_mappings formats: - Simple: List[str] - position = source index - Advanced: List[Tuple[int, str]] - explicit (index, column) mapping Simplified bulkcopy call to pass params directly (no kwargs dict) since Rust API now uses explicit defaults per Saurabh's review.
bewithgaurav
changed the title
FEAT: Replace bulkcopy kwargs with explicit parameters
FEAT: Explicit parameters and improved type hints for bulkcopy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters