Christian Müller ha scritto:
> Yep, I am
> First, I meant DB2 does not allow an underscore as the first character 
> of a table name.  Sorry.
> Second, I talked only about meta information.
> 
> About Sequences:
> The method
> public String getSequenceForColumn(String schemaName, String tableName, 
> String columnName, Connection cx) throws SQLException {
> in the DB2 Dialect checks only if there exists a sequence with the name
> tableName + "_" + columnName + "_SEQUENCE"
> That is poor. What if I want to have unique ids in the whole db, not 
> only within a table. No chance at the moment. Perhaps I should
> drop the sequence support completely and remove GEOT-2015. The lookup 
> plugin gives a possibility to use another sequence name or throw a 
> NotSupportedException.

I agree the above sequence logic is poor, and it's the reason to 
introduce a metadata table lookup instead.
Your DB2 dialect can just return null to that call, no need to throw
exceptions.

> 
> About Auto Generated Keys
> I cannont support autoincrement columns, no chance to get the value 
> before or after the insert. The Jdbc API Statement.getGeneratedKeys() 
> would be the right way. The real problem is the method
>   public boolean lookupGeneratedValuesPostInsert()
> For DB2, this is not true and not false. Again, the lookup plugin gives 
> me the possibility of a NotSupportedException.
> Your opinion ?

Same deal here. Just return null. But in this case you can also create
a custom implementation of the lookup logic that won't allow
auto-increment keys in DB2 and set it in your factory I guess.
I'll make sure that datastore factories have an opportunity to override
the default primary key lookup system with their own.

Deal?

Cheers
Andrea


-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
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

Reply via email to