diff --git a/jOOQ/src/main/java/org/jooq/DSLContext.java b/jOOQ/src/main/java/org/jooq/DSLContext.java index f509ca844e..960feeb443 100644 --- a/jOOQ/src/main/java/org/jooq/DSLContext.java +++ b/jOOQ/src/main/java/org/jooq/DSLContext.java @@ -8354,6 +8354,15 @@ public interface DSLContext extends Scope , AutoCloseable { @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, POSTGRES }) BigInteger nextval(String sequence) throws DataAccessException; + /** + * Convenience method to fetch the NEXTVAL for a sequence directly from this + * {@link DSLContext}'s underlying JDBC {@link Connection}. + * + * @throws DataAccessException if something went wrong executing the query + */ + @Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB, POSTGRES }) + BigInteger nextval(Name sequence) throws DataAccessException; + /** * Convenience method to fetch the NEXTVAL for a sequence directly from this * {@link DSLContext}'s underlying JDBC {@link Connection}. @@ -8372,6 +8381,15 @@ public interface DSLContext extends Scope , AutoCloseable { @Support({ CUBRID, FIREBIRD, H2, POSTGRES }) BigInteger currval(String sequence) throws DataAccessException; + /** + * Convenience method to fetch the CURRVAL for a sequence directly from this + * {@link DSLContext}'s underlying JDBC {@link Connection}. + * + * @throws DataAccessException if something went wrong executing the query + */ + @Support({ CUBRID, FIREBIRD, H2, POSTGRES }) + BigInteger currval(Name sequence) throws DataAccessException; + /** * Convenience method to fetch the CURRVAL for a sequence directly from this * {@link DSLContext}'s underlying JDBC {@link Connection}. diff --git a/jOOQ/src/main/java/org/jooq/impl/DefaultDSLContext.java b/jOOQ/src/main/java/org/jooq/impl/DefaultDSLContext.java index 7cf0f8693c..8d7fb76d9e 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DefaultDSLContext.java +++ b/jOOQ/src/main/java/org/jooq/impl/DefaultDSLContext.java @@ -3114,7 +3114,12 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri @Override public BigInteger nextval(String sequence) { - return nextval(sequence(name(sequence))); + return nextval(name(sequence)); + } + + @Override + public BigInteger nextval(Name sequence) { + return nextval(sequence(sequence)); } @Override @@ -3125,7 +3130,12 @@ public class DefaultDSLContext extends AbstractScope implements DSLContext, Seri @Override public BigInteger currval(String sequence) { - return currval(sequence(name(sequence))); + return currval(name(sequence)); + } + + @Override + public BigInteger currval(Name sequence) throws DataAccessException { + return currval(sequence(sequence)); } @Override