Christian Müller ha scritto: > A big +1 for interface or base class,I think a base class would be fine. > > @Justin, asfaik , DB2 does not allow underlines in table names. I am not > a friend of such default assumptions.
DB2 does not allow for underscore? Odd? > @Andrea, look at http://jira.codehaus.org/browse/GEOT-2015, it would be > a good idea to have an additional method > String getSequenceNameForPrimaryKey(String schema, String table, > Connection cx); Hum, we already have: public String getSequenceForColumn(String schemaName, String tableName, String columnName, Connection cx) throws SQLException { and: public Object getNextSequenceValue(String schemaName, String sequenceName, Connection cx ) throws SQLException { So sequences should be well covered? > I really would like to have the possibility of a db specific > implementation. Users with special requirements should be able to add > their own. > Until now, I have not checked how DB2 behaves in case of updatable > views. Another reason for a big +1 for a class/interface. Mind, the thing I'm proposing will just generate PrimaryKey objects. Those are just information, they contain PrimaryKeyColumn that will tell you if the column has a sequence, is autoincrement, or user set. That is it. Pure metadata. The actual code that grabs the pk values is spread around the JDBCDataStore class. I actually have the mandate to just make it possible to lookup Oracle sequence names by using a lookup table, but the sponsor has been generous enough to allow some more work so that this lookup table could be used by other databases as well. Actual code that generate the pk values won't be included in the lot anyways. If I can't make this more general version I'll just fall back on making a Oracle specific modification in the Oracle dialect. Are you still interested in having the primary key lookup system based on an abstract class? :-) Cheers Andrea -- Andrea Aime OpenGeo - http://opengeo.org Enterprise support for open source geospatial. ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel