-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Make cli sql output prettier. #2237
Conversation
Use github.com/olekukonko/tablewriter rather than tabwriter, it does tables just the way we want them. Before: ```sql > select * from system.namespace parentIDname id 0 system 1 1 descriptor 3 1 namespace 2 ``` After: ```sql > select * from system.namespace +----------+------------+----+ | PARENTID | NAME | ID | +----------+------------+----+ | 0 | system | 1 | | 1 | descriptor | 3 | | 1 | namespace | 2 | +----------+------------+----+ ```
This looks great. But can you add a test to make sure the output matches what we expect? |
LGTM. 👎 on the test because that's testing a dependency. |
LGTM. Now I feel like we're really implementing SQL. |
Yes, we are testing a dependency, which is why it should be simple, but we should make sure it doesn't change out from under us. |
@BramGruneir: ditto. we really need tests for all cli stuff (I've had #2008 against me for a while). I may do basic table stuff in there, but I'd rather avoid that entirely. As for changes, we control the revision. |
As long as we'll have some tests on the output somewhere, that works for me. |
I agree with bram, it's going to be difficult to update that dependency with confidence unless we have some sort of test here. LGTM otherwise. |
@mberhault I lied to you! It's |
Make cli sql output prettier.
Oops. forgot to squash. Oh well. |
Use github.com/olekukonko/tablewriter rather than tabwriter,
it does tables just the way we want them.
Before:
After: