I recently downloaded SQuirreL SQL and have found it to be one of the best
open source Java-based SQL tools around.
I immediately thought of a big wishlist of features, many of which I found
in Glenn's earlier post "Suggestions for improving Squirrel." I suppose the
ability to edit / delete / insert data is right at the top of my list,
closely followed by code completion (I'm excited to see that work is
underway on that feature). I would like to be able to contribute a bit
myself, and for starters, I have a suggestion and an implementation.
Many of the tabs in the object tree window, including the Columns tab, the
Indexes tab, ColumnPrivileges, etc., display a grid of information that is
obtained by calling various metadata methods. These tabs display all of the
columns of information returned by these metadata methods, in the order the
columns are returned by the methods. This isn't usually the order that is
most convenient for display purposes. I found myself having to do a lot of
horizontal scrolling to get to the info I needed.
For example, when looking at the Columns tab, I find the schema and the
table name listed in the first two columns; those probably could be omitted,
which would leave more room for the column name, data type, and other more
relevant info.
So I changed one line of code in the
net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.tabs.table.
ColumnsTab class:
In the createDataSet() method, change
rsds.setResultSet(rs,
getSession().getProperties().getLargeResultSetObjectInfo());
to
rsds.setResultSet(rs,
getSession().getProperties().getLargeResultSetObjectInfo(), new int[] { 4,
6, 7, 9, 18, 13, 12 });
voila -- unnecessary columns omitted. I suppose if someone really wants
them, they could be moved to the end, like this:
rsds.setResultSet(rs,
getSession().getProperties().getLargeResultSetObjectInfo(), new int[] { 4,
6, 7, 9, 18, 13, 12, 1, 2, 3, 5, 8, 10, 11, 14, 15, 16, 17 });
I made similar changes in the other tabs. This helped a lot, but I still had
to do a lot of horizontal scrolling, because the default column widths were
too big.
I added some code to the
net.sourceforge.squirrel_sql.fw.datasetviewer.ResultSetDataSet class to
dynamically compute appropriate column widths, and got much better results.
I would be glad to contribute this code if someone will point me to the
instructions for doing so.
This is a relatively minor change, but I think it helps the usability quite
a bit.
I would be interested in adding features to the pop-up menu for the Content
tab, to allow the user to Select N rows, and to add tooltips to column
headers, so that you don't have to expand the column to see the full column
name.
Stephen Schaub
Department of Computer Science
Bob Jones University
(864) 370-1800 x2264
|