-
-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create dolt_help system table #8739
Open
milogreg
wants to merge
15
commits into
dolthub:main
Choose a base branch
from
milogreg:dolt-help-table
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
13c546b
Create dolt_help system table
milogreg f86a441
Update system-tables.bats to include tests for dolt_help table
milogreg d0fca91
Fix unnecessary recomputation
milogreg 485cbb3
Fix procedure name formatting
milogreg 2009c87
Fix failing go test
milogreg b17e52d
Fix failing bats test
milogreg 0495fe3
Update schema
milogreg 8373c72
Add flags in addition to arguments to dolt_help table
milogreg 7d042f6
Populate synopsis in dolt_help table
milogreg 4355fae
Clean up HelpRowIter
milogreg 4c0ab89
Update bats tests
milogreg 6e87334
Fix invalid JSON bug
milogreg 920e7f0
Fix synopsis bug
milogreg f88f7b9
Add enginetests for dolt_help argument JSON validity and successive s…
milogreg dbee26c
Add enginetests to validate results of selects on dolt_help
milogreg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
// Copyright 2025 Dolthub, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package doltcmd | ||
|
||
import ( | ||
"github.com/dolthub/dolt/go/cmd/dolt/cli" | ||
"github.com/dolthub/dolt/go/cmd/dolt/commands" | ||
"github.com/dolthub/dolt/go/cmd/dolt/commands/admin" | ||
"github.com/dolthub/dolt/go/cmd/dolt/commands/ci" | ||
"github.com/dolthub/dolt/go/cmd/dolt/commands/cnfcmds" | ||
"github.com/dolthub/dolt/go/cmd/dolt/commands/credcmds" | ||
"github.com/dolthub/dolt/go/cmd/dolt/commands/cvcmds" | ||
"github.com/dolthub/dolt/go/cmd/dolt/commands/docscmds" | ||
"github.com/dolthub/dolt/go/cmd/dolt/commands/indexcmds" | ||
"github.com/dolthub/dolt/go/cmd/dolt/commands/schcmds" | ||
"github.com/dolthub/dolt/go/cmd/dolt/commands/sqlserver" | ||
"github.com/dolthub/dolt/go/cmd/dolt/commands/stashcmds" | ||
"github.com/dolthub/dolt/go/cmd/dolt/commands/tblcmds" | ||
"github.com/dolthub/dolt/go/cmd/dolt/doltversion" | ||
) | ||
|
||
var dumpDocsCommand = &commands.DumpDocsCmd{} | ||
var dumpZshCommand = &commands.GenZshCompCmd{} | ||
|
||
var doltSubCommands = []cli.Command{ | ||
commands.InitCmd{}, | ||
commands.StatusCmd{}, | ||
commands.AddCmd{}, | ||
commands.DiffCmd{}, | ||
commands.ResetCmd{}, | ||
commands.CleanCmd{}, | ||
commands.CommitCmd{}, | ||
commands.SqlCmd{VersionStr: doltversion.Version}, | ||
admin.Commands, | ||
sqlserver.SqlServerCmd{VersionStr: doltversion.Version}, | ||
commands.LogCmd{}, | ||
commands.ShowCmd{}, | ||
commands.BranchCmd{}, | ||
commands.CheckoutCmd{}, | ||
commands.MergeCmd{}, | ||
cnfcmds.Commands, | ||
commands.CherryPickCmd{}, | ||
commands.RevertCmd{}, | ||
commands.CloneCmd{}, | ||
commands.FetchCmd{}, | ||
commands.PullCmd{}, | ||
commands.PushCmd{}, | ||
commands.ConfigCmd{}, | ||
commands.RemoteCmd{}, | ||
commands.BackupCmd{}, | ||
commands.LoginCmd{}, | ||
credcmds.Commands, | ||
commands.LsCmd{}, | ||
schcmds.Commands, | ||
tblcmds.Commands, | ||
commands.TagCmd{}, | ||
commands.BlameCmd{}, | ||
cvcmds.Commands, | ||
commands.SendMetricsCmd{}, | ||
commands.MigrateCmd{}, | ||
indexcmds.Commands, | ||
commands.ReadTablesCmd{}, | ||
commands.GarbageCollectionCmd{}, | ||
commands.FsckCmd{}, | ||
commands.FilterBranchCmd{}, | ||
commands.MergeBaseCmd{}, | ||
commands.RootsCmd{}, | ||
commands.VersionCmd{VersionStr: doltversion.Version}, | ||
commands.DumpCmd{}, | ||
commands.InspectCmd{}, | ||
dumpDocsCommand, | ||
dumpZshCommand, | ||
docscmds.Commands, | ||
stashcmds.StashCommands, | ||
&commands.Assist{}, | ||
commands.ProfileCmd{}, | ||
commands.QueryDiff{}, | ||
commands.ReflogCmd{}, | ||
commands.RebaseCmd{}, | ||
commands.ArchiveCmd{}, | ||
ci.Commands, | ||
} | ||
|
||
var DoltCommand = cli.NewSubCommandHandler("dolt", "it's git for data", doltSubCommands) | ||
|
||
var globalArgParser = cli.CreateGlobalArgParser("dolt") | ||
|
||
var doc = cli.CommandDocumentationContent{ | ||
ShortDesc: "Dolt is git for data", | ||
LongDesc: `Dolt comprises of multiple subcommands that allow users to import, export, update, and manipulate data with SQL.`, | ||
|
||
Synopsis: []string{ | ||
"<--data-dir=<path>> subcommand <subcommand arguments>", | ||
}, | ||
} | ||
var globalDocs = cli.CommandDocsForCommandString("dolt", doc, globalArgParser) | ||
|
||
var globalSpecialMsg = ` | ||
Dolt subcommands are in transition to using the flags listed below as global flags. | ||
Not all subcommands use these flags. If your command accepts these flags without error, then they are supported. | ||
` | ||
|
||
func init() { | ||
dumpDocsCommand.DoltCommand = DoltCommand | ||
dumpDocsCommand.GlobalDocs = globalDocs | ||
dumpDocsCommand.GlobalSpecialMsg = globalSpecialMsg | ||
dumpZshCommand.DoltCommand = DoltCommand | ||
} |
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.