-
-
Notifications
You must be signed in to change notification settings - Fork 526
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
migrate dolt ls to use sql queries #6834
Conversation
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.
Very close. The only objection I have at the moment is that we don't test the SQL directly with the new flag. I think a couple enginetests are in order because we are testing it exclusively as a part of dolt ls
- there are going to be people who want this in the sql conext so we should test that way
} | ||
|
||
r, err := cm.GetRootValue(ctx) | ||
|
||
_, _, err = queryist.Query(sqlCtx, "set @@dolt_show_system_tables = 1") |
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.
Question - does it work if we just put this set call as a prefix on the main query?
"set @@dolt_show_system_tables = 1; show tables ... "
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.
No they don't work all in one string. I think the way dolt sql -q
is set up doesn't allow multiple statements in one call.
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.
huh. Sounds like a feature we should have. ok. never mind for now!
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.
__|__ |___| |\
|o__| |___| | \
|___| |___| |o \
_|___| |___| |__o\
/...\_____|___|____\_/
\ o * o * * o o /
~~~~~~~~~~~~~~~~~~~~~~~~~~
This change updates
dolt ls
to use the appropriate sql engine to generate results. This change also creates a system variable that, when enabled, shows dolt system tables inshow tables
andinformation_schema.tables
.Related: #3922
Resolves: #2073