Skip to content

docs: add sqlcmd --query flag gotcha#64

Merged
Hinne1 merged 1 commit intomainfrom
claude/sqlcmd-query-flag-docs
Apr 1, 2026
Merged

docs: add sqlcmd --query flag gotcha#64
Hinne1 merged 1 commit intomainfrom
claude/sqlcmd-query-flag-docs

Conversation

@Hinne1
Copy link
Copy Markdown
Contributor

@Hinne1 Hinne1 commented Apr 1, 2026

Summary

  • Documents that multi-line SQL with leading -- comments breaks when passed as a positional argument to sqlcmd query
  • Recommends using the --query named flag as a workaround

Discovered during NX-15422 when sqlcmd query "$(cat file.sql)" failed because the leading SQL comments were parsed as CLI flags.

Test plan

  • Run npm start and verify docs generate correctly

Leading `--` comments in positional arguments get parsed as CLI flags.
Document the workaround of using the `--query` named flag instead.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a 'Gotchas' section to the documentation in lib/llm/index.js to address issues where multi-line SQL comments are misinterpreted as CLI flags. The review feedback correctly identifies that the sqlcmd query subcommand lacks a --query flag and suggests using the -- separator to properly handle positional arguments starting with dashes.

@Hinne1 Hinne1 marked this pull request as ready for review April 1, 2026 01:01
@Hinne1 Hinne1 merged commit 5ea6b4f into main Apr 1, 2026
7 checks passed
@Hinne1 Hinne1 deleted the claude/sqlcmd-query-flag-docs branch April 1, 2026 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant