Closed
Conversation
Add the :help command to display available sqlcmd commands. This improves compatibility with legacy ODBC sqlcmd. Changes: - Added HELP command to command registry - Added helpCommand function with full command list - Added tests for command parsing and functionality - Updated README.md
There was a problem hiding this comment.
Pull request overview
This PR adds a :help meta-command to the Go sqlcmd implementation to improve parity with the legacy ODBC sqlcmd by listing available sqlcmd commands.
Changes:
- Extend the
Commandsmap with a newHELPcommand and implementhelpCommandto print a built-in help text block. - Add parsing and behavior tests for the
:helpcommand inpkg/sqlcmd/commands_test.go. - Document the new
:helpbehavior in theREADME.mdunder miscellaneous enhancements.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
pkg/sqlcmd/commands.go |
Registers the HELP command in newCommands() and implements helpCommand to write a multi-line command reference to the current output. |
pkg/sqlcmd/commands_test.go |
Extends command parsing tests to cover :HELP/:help and adds TestHelpCommand to verify that key commands appear in the help output. |
README.md |
Adds a bullet describing :help as displaying the list of available sqlcmd commands, surfacing the new feature to users. |
- Remove :serverlist and :perftrace from help text - These commands are in separate PRs and not yet merged - Help text should only list commands that exist in this branch
Contributor
Author
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the :help command to display available sqlcmd commands, improving compatibility with legacy ODBC sqlcmd.
Usage
Changes
Testing