Stephen Schaub wrote:
> 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
Thanks. I got plenty more to come...
> ability to edit / delete / insert data is right at the top of my list,
I've good start on the edit function.
> 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.
I assume that you know that you can re-order the columns by dragging the
headers, but that only helps until you dismiss the table. Next time it
comes back, you'ld have to drag them again, so while it might help a
little, it doesn't solve the problem.
>
> 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 });
My experience is that it is not a good idea to hard-code specific
numbers such as the column indexes. This is liable to cause maintenance
problems in the future. Also, defining the specific list of "important"
columns for each of the possible tabs and the corresponding column
numbers would be tedious as well as being error-prone and a maintenance
issue. Also, this approach cannot be used to help people with the
Contents tab since the contents of the Contents tab depends on the
layout of the specific table in the database.
>
> voila -- unnecessary columns omitted.
It is usually a bad idea to throw out data. The main reason is that
your needs are not the same as my needs or someone else's needs, and
none of us are smart enough to predict what will be needed by others (or
ourselves!) in the future. Another reason is that if people are trying
to use Squirrel and see that it does not display data that they know is
available from JDBC, they could lose faith in it and not use it because
they don't know that it is reliable.
> 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
Putting the "useless" columns at the end is better, but my previous
point about hard-coding column numbers still applies.
Colin's idea about creating a "Important data" vs. "Complete data"
setting would be an improvement. However, if we do this, we should make
it easy for the user to see that they are getting only part of the
picture. Something like text in the window title, a yellow border
around the data, a warning message in the message area, something..
An even better approach would be to implement something like Eclipse's
state-save mechanism for every tab and table. For every tab and table
that the user opens, we could invisibly save information about the
user's ordering of the columns in that tab/table. The first time that
the user opens a tab or table contents, they could shuffle the columns
into an order that they like and Squirrel would remember that order.
That way, we would not need to worry about which columns are important
in each of the tabs, and the user would not need to worry about which
mode (full or partial) they are in. Assuming that we build this as a
part of the general table mechanism, this would also automatically apply
to the contents of the user's tables, so when a user re-opens the
contents of a table they would automatically see the columns layed out
in the order that they left them in last time.
> 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.
Cool.
There are other possible modes that other people might want, such as:
- maximum size of column data
- fixed default size settable by user to N chars
- maximum size of data currently in the column
Should we put this choice in the Session Properties window and let the
user select which they want?
>
> 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
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:
> To learn the basics of securing your web site with SSL,
> click here to get a FREE TRIAL of a Thawte Server Certificate:
> http://www.gothawte.com/rd522.html
> _______________________________________________
> Squirrel-sql-develop mailing list
> Squ...@li...
> https://lists.sourceforge.net/lists/listinfo/squirrel-sql-develop
>
>
|