feat: implement -p flag for print statistics by dlevy-msft-sql · Pull Request #631 · microsoft/go-sqlcmd

This was referenced

Jan 25, 2026

dlevy-msft-sql added a commit to dlevy-msft-sql/go-sqlcmd that referenced this pull request

Jan 25, 2026
- Add 'p' to checkDefaultValue for bare -p flag support
- Fix error message to show both '0' and '1' as valid values
- Remove trailing space in colon-separated format output
- Add test cases for -p and -p 1 flags

@dlevy-msft-sql dlevy-msft-sql changed the title Implement -p flag for print statistics feat: implement -p flag for print statistics

Feb 5, 2026

@dlevy-msft-sql

Adds -p and -p1 flags to print execution statistics after each batch:
- -p: Standard format with packet size, execution count, and timing
- -p1: Colon-separated format for parsing (packetSize:batches:total:avg:rate)

Uses new DefaultPacketSize constant (4096) instead of magic numbers.