Skip to content
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

Vertical/Expanded row display #33

Closed
ahmedmohiduet opened this issue Nov 17, 2017 · 4 comments
Closed

Vertical/Expanded row display #33

ahmedmohiduet opened this issue Nov 17, 2017 · 4 comments

Comments

@ahmedmohiduet
Copy link

ahmedmohiduet commented Nov 17, 2017

Can I view records vertically with column names along side data?
It's like '\X' flag for `Expanded Display' in psql(PostgreSQL).
I am exploring Sql Server 2008 database

@kenshaw
Copy link
Member

kenshaw commented Nov 24, 2017

While I eventually intend to build out support for all the psql standard commands, this isn't high on my priority list. I'd welcome a PR for this, however. It would be fairly easy to implement.

@KeeonTabrizi
Copy link

fwiw, one of the first questions i thought of when seeing this project was if it supports expanded display

@nineinchnick
Copy link
Member

nineinchnick commented Dec 23, 2020

I gave it a shot at xo/tblfmt#8 - if this is merged and go.mod is bumped no other changes are required. I tested this with:

% echo "replace github.com/xo/tblfmt => github.com/nineinchnick/tblfmt v0.0.0-20201223194615-db8a914c3ebe" >> go.mod
% go mod tidy
% go run . sqlite://:memory:
Connected with driver sqlite3 (SQLite3 3.31.1)
Type "help" for help.

sq::memory:=> select 1;
 1 
---
 1 
(1 row)

sq::memory:=> \x
Expanded display is on.
sq::memory:=> \pset border 2
Border style is 2.
sq::memory:=> select 2 as aaaaa, 5 as b;
+-[ RECORD 1 ]-+
| aaaaa | 2    |
| b     | 5    |
+-------+------+

@nineinchnick
Copy link
Member

This is now in master and this issue can be closed.

@kenshaw kenshaw closed this as completed Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants