When using Emacs to create a SQL query in SQL-mode, the SQLi buffer is the typical, ugly console window of the command-line tool for the target database. Most of the output is the same with ASCII characters trying to build a visual representation of a table.
Has anyone created a minor mode to make the output more readable? Here are some features that could be useful:
- Create a Header. I'm not sure how this could be done, but it would be very cool if there was a way to visually show the user which columns go with the data. If I'm looking at line 300 of an output, it's a bit challenging to count the columns and read the SQL that was used. Maybe it would be something like a hacked up mode-line that doesn't change when scrolling vertically, but does when scrolling horizontally.
- Only Show the Last Result. When I run a new query, that's all I want to see in the SQLi window. It'd be nice to have a feature to jump through the history of results from previous SQL queries.
- Faces. Create different colors for grid lines and data. Maybe even different colors for different data types (maybe this is too hard)
I think these features would make Emacs more palatable for database developers. There are a ton of packages that do these these same tasks and others well, but they aren't nearly as powerful as Emacs. Also, it's quite annoying to switch editors just to write my SQL queries.
EDIT: Something like hexl-mode would be very cool.