John Spackman - 2007-10-09

Dear all,

I've made a release of 3.5.0 beta 2, and as I mentioned in the public release note there have been some pretty extensive changes under the hood.  These are:

ConnectionsView
---------------
In order to establish an on-demand "pool" of connections available to the Editor and DBStructureView (and any other code that might need it) I needed to abstract the allocation of SQLConnection instances from the Editor etc; also, it was important to know which user name was used to establish the connection, and previously SQLExplorer could allow several indistinguishable connections for the same alias with different user names.

The ConnectionsView now shows the alias, in which are users, in which are connections.  There was a lot of code (in the main sqlexplorer module as well as individual database modules) which refered to the TreeContentProvider for ConnectionsView and had hard coded assumptions about the heirarchy.  To make sure that the compiler identified the new heirarchy and to insulate against future changes, the ConnectionsView now provides an API to get aliases, users, connections and does not expose the tree or it's viewer.

When I was looking at this, I discovered that SQLExplorer was dependant on parts of SquirrelSQL for which there is no source available, not even on SquirrelSQL CVS at SourceForge.  Apart from the lack of source, for what we needed the [I]SQLDriver mechanism appeared complicated, and used a complex and undocumented persistence mechanism from SquirrelSQL, and needed to be upgraded to cope with some of the changes anyway.  As a result, some code has been removed and replaced by a lightweight set of classes for managing drivers, aliases, users, sessions, and connections.  Where possible, nothing has really changed, EG SessionTreeNode still exists but is moved and renamed to Session to underline the difference, and we now have our own SQLConnection derived from SquirrelSQL.

Removed . . . . . . . . .Replacement
------- . . . . . . . . .-----------
AliasModel . . . . . . . dbproduct.AliasManager
DataCache . . . . . . . .N/A
DriverModel . . . . . . .dbproduct.DriverManager
IdentifierFactory . . . .N/A
SQLAlias. . . . . . . . .dbproduct.Alias
SQLAliasBeanInfo. . . . .N/A
SQLDriverManager . . . . dbproduct.DriverManager
sessiontree.model.* . . .dbproduct.*

There is an automatic upgrade path from old configuration files to the new.

SQL History
-----------
The History needed to support the username as well as the alias name, so I changed it from the proprietary format to XML for ease of maintenance.

AbstractSQLExecution
--------------------
Now inherits from Job, so that Eclipse can manage our threads for us and we can get better progress feedback.

DatabaseProduct
---------------
Although this was new for 3.5.0.beta1, it has changed so that it can take over the entire processes of executing a query because queries can now return multiple result sets - either because the underlying database platform supports multiple resultsets via calls to getMoreResults() or through output parameters (eg Oracle cursors).  Also, because named parameters are supported for input and output, the final result set is a psuedo-table of the parameters and the values that were returned in them.

net.sourceforge.sqlexplorer.dataset.DataSet
-------------------------------------------
When a result comes back from the database it is loaded into DataSet as a two dimensional array of objects (actually an array of DataSetRow which holds an array of Comparable); it
was previously up to the calling code to decide how to display the data, and in 3.5.0beta1 this was done simply by calling toString() on the object.

While the toString() method works in the general case, allowing the object to enable its own interpretation, this is not always suitable.  DataSet has changed in that it maintains
an array of DataSet.Column objects, each of which can be asked to provide a column name, whether left or right justified (eg for numbers), and an optional Format object to provide
custom formatting.

NanoXML
-------
NanoXml was not being used, so I removed it in favour of DOM4J.

SVN
---
Unless there are any objections, I will at some time in the near future convert the SourceForge repository over to SVN; I've posted about this a couple of weeks ago and there's been no reply so I presume it's OK to do so.  I'll most some more messages and give plenty of notice nearer the time.

Regards,
John