Author: steve.ebersole(a)jboss.com
Date: 2007-10-02 22:50:59 -0400 (Tue, 02 Oct 2007)
New Revision: 14044
Modified:
core/trunk/core/src/main/java/org/hibernate/dialect/HSQLDialect.java
Log:
HHH-2839 : HSQLDB and sequences
Modified: core/trunk/core/src/main/java/org/hibernate/dialect/HSQLDialect.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/dialect/HSQLDialect.java 2007-10-03
02:25:50 UTC (rev 14043)
+++ core/trunk/core/src/main/java/org/hibernate/dialect/HSQLDialect.java 2007-10-03
02:50:59 UTC (rev 14044)
@@ -202,31 +202,20 @@
return true;
}
- public String[] getCreateSequenceStrings(String sequenceName) {
- return getCreateSequenceStrings( sequenceName, 1, 1 );
+ protected String getCreateSequenceString(String sequenceName) {
+ return "create sequence " + sequenceName;
}
- public String[] getCreateSequenceStrings(String sequenceName, int initialValue, int
incrementSize) {
- return new String[] {
- "create table dual_" + sequenceName + " (zero integer)",
- "insert into dual_" + sequenceName + " values (0)",
- "create sequence " + sequenceName + " start with " +
initialValue + " increment by " + incrementSize
- };
+ protected String getDropSequenceString(String sequenceName) {
+ return "drop sequence " + sequenceName;
}
- public String[] getDropSequenceStrings(String sequenceName) {
- return new String[] {
- "drop table dual_" + sequenceName + " if exists",
- "drop sequence " + sequenceName
- };
- }
-
public String getSelectSequenceNextValString(String sequenceName) {
return "next value for " + sequenceName;
}
public String getSequenceNextValString(String sequenceName) {
- return "select next value for " + sequenceName + " from dual_" +
sequenceName;
+ return "call next value for " + sequenceName;
}
public String getQuerySequencesString() {
Show replies by date