File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
hibernate-core/src/main/java/org/hibernate/dialect Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,16 @@ public boolean supportsSequences() {
123123 return driverVersionMajor > 10 || ( driverVersionMajor == 10 && driverVersionMinor >= 6 );
124124 }
125125
126+ @ Override
127+ public String getQuerySequencesString () {
128+ if ( supportsSequences () ) {
129+ return "select SEQUENCENAME from SYS.SYSSEQUENCES" ;
130+ }
131+ else {
132+ throw new MappingException ( "Derby does not support sequence prior to release 10.6.1.0" );
133+ }
134+ }
135+
126136 @ Override
127137 public String getSequenceNextValString (String sequenceName ) {
128138 if ( supportsSequences () ) {
@@ -235,7 +245,7 @@ private boolean hasForUpdateClause(int forUpdateIndex) {
235245 }
236246
237247 private boolean hasWithClause (String normalizedSelect ){
238- return normalizedSelect .startsWith ( "with " , normalizedSelect .length ()- 7 );
248+ return normalizedSelect .startsWith ( "with " , normalizedSelect .length () - 7 );
239249 }
240250
241251 private int getWithIndex (String querySelect ) {
@@ -246,11 +256,6 @@ private int getWithIndex(String querySelect) {
246256 return i ;
247257 }
248258
249- @ Override
250- public String getQuerySequencesString () {
251- return null ;
252- }
253-
254259
255260 // Overridden informational metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
256261
You can’t perform that action at this time.
0 commit comments