microsoft / microsoft/go-sqlcmd

Feature: Markdown table output format (--markdown)

Open
#619 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
595
Forks
91
Avg merge
9h 35m
Merged PRs (30d)
1

Description

Summary

Add a --markdown flag to output query results as Markdown tables.

Use Case

  • Copy/paste results directly into GitHub issues, PRs, or documentation
  • Generate documentation from database queries
  • Integration with documentation pipelines

Proposed Syntax

sqlcmd -S server -Q "SELECT * FROM users" --markdown

Example Output

| id | name | email |
|----|------|-------|
| 1 | Alice | alice@example.com |
| 2 | Bob | bob@example.com |

Implementation Notes

  • Could leverage existing formatter infrastructure in pkg/sqlcmd/formatter.go
  • Similar approach to how XML output is handled

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in pkg/sqlcmd/formatter.go and compare the existing XML output handling. Trace how command-line output formats are selected, then add the --markdown path so query results match the proposed table format. Done means the example command produces Markdown headers, separators, and rows; add or update formatter coverage if existing tests are found nearby.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, markdown, sql
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.