[#2496] Added missing @Support annotations
This commit is contained in:
parent
1c7cbc1089
commit
45f1a65729
@ -4554,7 +4554,7 @@ public interface DSLContext {
|
||||
*
|
||||
* @throws DataAccessException if something went wrong executing the query
|
||||
*/
|
||||
@Support({ CUBRID, DB2, DERBY, FIREBIRD, H2, HSQLDB, INGRES, ORACLE, POSTGRES, SYBASE })
|
||||
@Support({ CUBRID, DB2, DERBY, FIREBIRD, H2, HSQLDB, INGRES, ORACLE, POSTGRES, SQLSERVER, SYBASE })
|
||||
<T extends Number> T nextval(Sequence<T> sequence) throws DataAccessException;
|
||||
|
||||
/**
|
||||
@ -4563,7 +4563,7 @@ public interface DSLContext {
|
||||
*
|
||||
* @throws DataAccessException if something went wrong executing the query
|
||||
*/
|
||||
@Support({ CUBRID, DB2, FIREBIRD, H2, INGRES, ORACLE, POSTGRES, SYBASE })
|
||||
@Support({ CUBRID, DB2, FIREBIRD, H2, INGRES, ORACLE, POSTGRES, SQLSERVER, SYBASE })
|
||||
<T extends Number> T currval(Sequence<T> sequence) throws DataAccessException;
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@ -44,6 +44,7 @@ import static org.jooq.SQLDialect.HSQLDB;
|
||||
import static org.jooq.SQLDialect.INGRES;
|
||||
import static org.jooq.SQLDialect.ORACLE;
|
||||
import static org.jooq.SQLDialect.POSTGRES;
|
||||
import static org.jooq.SQLDialect.SQLSERVER;
|
||||
import static org.jooq.SQLDialect.SYBASE;
|
||||
|
||||
import java.io.Serializable;
|
||||
@ -73,12 +74,12 @@ public interface Sequence<T extends Number> extends Serializable {
|
||||
/**
|
||||
* Get the current value of this sequence
|
||||
*/
|
||||
@Support({ CUBRID, DB2, FIREBIRD, H2, INGRES, ORACLE, POSTGRES, SYBASE })
|
||||
@Support({ CUBRID, DB2, FIREBIRD, H2, INGRES, ORACLE, POSTGRES, SQLSERVER, SYBASE })
|
||||
Field<T> currval();
|
||||
|
||||
/**
|
||||
* Increment the sequence and get the next value
|
||||
*/
|
||||
@Support({ CUBRID, DB2, DERBY, FIREBIRD, H2, HSQLDB, INGRES, ORACLE, POSTGRES, SYBASE })
|
||||
@Support({ CUBRID, DB2, DERBY, FIREBIRD, H2, HSQLDB, INGRES, ORACLE, POSTGRES, SQLSERVER, SYBASE })
|
||||
Field<T> nextval();
|
||||
}
|
||||
|
||||
@ -37,18 +37,11 @@
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.KeepResultSetMode.CLOSE_AFTER_FETCH;
|
||||
import static org.jooq.SQLDialect.ASE;
|
||||
import static org.jooq.SQLDialect.CUBRID;
|
||||
import static org.jooq.SQLDialect.DB2;
|
||||
import static org.jooq.SQLDialect.DERBY;
|
||||
import static org.jooq.SQLDialect.FIREBIRD;
|
||||
import static org.jooq.SQLDialect.H2;
|
||||
import static org.jooq.SQLDialect.HSQLDB;
|
||||
import static org.jooq.SQLDialect.INGRES;
|
||||
import static org.jooq.SQLDialect.MYSQL;
|
||||
import static org.jooq.SQLDialect.ORACLE;
|
||||
import static org.jooq.SQLDialect.POSTGRES;
|
||||
import static org.jooq.SQLDialect.SQLITE;
|
||||
import static org.jooq.SQLDialect.SQLSERVER;
|
||||
import static org.jooq.SQLDialect.SYBASE;
|
||||
import static org.jooq.conf.ParamType.INLINED;
|
||||
@ -1470,7 +1463,6 @@ public class DefaultDSLContext implements DSLContext, Serializable {
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
@Support({ ASE, CUBRID, DERBY, H2, HSQLDB, INGRES, MYSQL, SQLITE, SQLSERVER, SYBASE })
|
||||
public BigInteger lastID() throws DataAccessException {
|
||||
switch (configuration.dialect()) {
|
||||
case DERBY: {
|
||||
@ -1513,15 +1505,13 @@ public class DefaultDSLContext implements DSLContext, Serializable {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Support({ CUBRID, DB2, DERBY, FIREBIRD, H2, HSQLDB, INGRES, ORACLE, POSTGRES, SYBASE })
|
||||
public <T extends Number> T nextval(Sequence<T> sequence) {
|
||||
Field<T> nextval = sequence.nextval();
|
||||
return select(nextval).fetchOne(nextval);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Support({ CUBRID, DB2, FIREBIRD, H2, INGRES, ORACLE, POSTGRES, SYBASE })
|
||||
public <T extends Number> T currval(Sequence<T> sequence) throws DataAccessException {
|
||||
public <T extends Number> T currval(Sequence<T> sequence) {
|
||||
Field<T> currval = sequence.currval();
|
||||
return select(currval).fetchOne(currval);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user