HHH-2839 : HSQLDB and sequences
git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@14044 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
75d63553c3
commit
d43a3d7d96
|
@ -202,23 +202,12 @@ public class HSQLDialect extends Dialect {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getCreateSequenceStrings(String sequenceName) {
|
protected String getCreateSequenceString(String sequenceName) {
|
||||||
return getCreateSequenceStrings( sequenceName, 1, 1 );
|
return "create sequence " + sequenceName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getCreateSequenceStrings(String sequenceName, int initialValue, int incrementSize) {
|
protected String getDropSequenceString(String sequenceName) {
|
||||||
return new String[] {
|
return "drop sequence " + sequenceName;
|
||||||
"create table dual_" + sequenceName + " (zero integer)",
|
|
||||||
"insert into dual_" + sequenceName + " values (0)",
|
|
||||||
"create sequence " + sequenceName + " start with " + initialValue + " increment by " + incrementSize
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public String[] getDropSequenceStrings(String sequenceName) {
|
|
||||||
return new String[] {
|
|
||||||
"drop table dual_" + sequenceName + " if exists",
|
|
||||||
"drop sequence " + sequenceName
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSelectSequenceNextValString(String sequenceName) {
|
public String getSelectSequenceNextValString(String sequenceName) {
|
||||||
|
@ -226,7 +215,7 @@ public class HSQLDialect extends Dialect {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSequenceNextValString(String sequenceName) {
|
public String getSequenceNextValString(String sequenceName) {
|
||||||
return "select next value for " + sequenceName + " from dual_" + sequenceName;
|
return "call next value for " + sequenceName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getQuerySequencesString() {
|
public String getQuerySequencesString() {
|
||||||
|
|
Loading…
Reference in New Issue