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.
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
Create dolt_help system table #8739
Changes from 11 commits
13c546b
f86a441
d0fca91
485cbb3
2009c87
b17e52d
0495fe3
8373c72
7d042f6
4355fae
4c0ab89
6e87334
920e7f0
f88f7b9
dbee26c
06e385b
ba2b90c
c94a934
5eca72c
a7b286e
62c27a6
9892a48
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Prefer to define an actual struct here, with
[]sql.Row
field and a counter int to keep track of the place in it.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.
This loop can be simplified, because there are no procedures that correspond to sub commands. E.g. there is no
dolt_table_ls
command.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.
Would pull out a boolean
procedureExists
method for this, and check for this condition before beginning the loopThere 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.
I'm not sure why, but something about this seems to be producing invalid json in a subtle and weird way. Check this out:
So whatever it is, it's getting handled by our round-trip into storage, but can't get processed by as returned by this table. This seems to affect all our json functions, so it needs to be fixed. Another example:
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.
I think it has something to do with the
<
and>
characters. I would expect json.Marshall to do something reasonable there but it apparently is not.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.
Above examples work great now, but there's a related problem where ascii command characters (used for bolding on the terminal) are making it into the SQL output like this:
I think what we need here is the
OptionsUsageList()
method to accept a Formatter object (needs to be defined) that we can use to change out the formatting behavior. For the SQL use case, we want to pass a formatter that just deletes the template options, rather than replacing them with command chars like the CLI implementation does.