Bad handling of sql sequences
-----------------------------
Key: GEOT-2015
URL: http://jira.codehaus.org/browse/GEOT-2015
Project: GeoTools
Issue Type: Improvement
Components: data h2
Affects Versions: 2.5.0, 2.6-M0
Reporter: Christian Mueller
SQLDialect>>getSequenceForColumn
and
SQLDIALECT>>getNextSequenceValue
are in my opinion a brute force attack to the problem.
1) As I have seen in the OracleDialict we rely here on a naming convention,
<tableName>_<columnName>_SEQUENCE
which is hard stuff. Which user should now this ? Sequences have no
associations with tables, so this
association has to be configured externally.
2) For each insert we use an extra sql statement which queries the next
sequence number. So we duplicate the
communication to the database. I am missing a method
encodeNextSequenceValue (schema,sequence)
which should result in (DB2 Syntax)
INSERT into table (values pk,att1,att2) values ( next value for sequence,
"Hallo","World");
In Oracle
INSERT into table (values pk,att1,att2) values ( sequence.nextvalue,
"Hallo","World");
and so on
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel