dbcli / litecli

CLI for SQLite Databases with auto-completion and syntax highlighting
https://litecli.com
BSD 3-Clause "New" or "Revised" License
2.47k stars 73 forks source link

When there's no rows to output, headers should still show up #18

Closed j-bennet closed 5 years ago

j-bennet commented 5 years ago

When displaying an empty recordset, litecli is not consistent with other clis.

litecli behavior:

/Users/irina/repos/engineering/rebuilds.sqlite> create table abc(a text)
Query OK, 0 rows affected
Time: 0.002s
/Users/irina/repos/engineering/rebuilds.sqlite> select * from abc
0 rows in set
Time: 0.000s

pgcli behavior:

irina@/tmp:test> create table abc (a text)
CREATE TABLE
Time: 0.022s
irina@/tmp:test> select * from abc
+-----+
| a   |
|-----|
+-----+
SELECT 0
Time: 0.012s
amjith commented 5 years ago

I don't know how @delgermurun managed to not show the table headers for no results but I kinda like how litecli shows it. I'm gonna stick with the current behavior.