bpangburn / swingset

SwingSet is an open source Java toolkit containing data-aware replacements for many of the standard Java Swing components.
3 stars 2 forks source link

Make grid database type usage consistent with RowSetOps #181

Closed errael closed 9 months ago

errael commented 10 months ago

@prasanthreddy-git @bpangburn

About using JDBCType Enum

Goals/issues

In SSTableModel there are several places where's there's a TODO comment about using JDBCType. I think those comments were already there from way back, before this Grid PR.

This PR changes a simple case: getColumnClass modified using RowSetOps methods. findJavaTypeClass() handles more types that Grid was using, and some are handled differently:

Take a look, if it makes sense, other places can be modified to match. I'm unclear about the type mapping and/or how it interacts with the Grid. An additional issue, in SSDataGrid there working on an object and casting it to a specific type; that's currently not in RowSetOps. In RowSetOps it's mostly working with a string. Maybe working with objects needs to be put into RowSetOps.

errael commented 10 months ago

In RowSetOps add method updateColumnObject which updates a RowSet column with a value. There are actually two versions of this method, one just simple does rowSet.updateObject() and lets the jdbc driver do the conversion.

errael commented 10 months ago

@bpangburn For RowSetOps, AFAICT, this is good for review. Includes fixes