Module org.jooq
Package org.jooq

Annotation Type Allow

    public @interface Allow
    Allow a set of SQLDialect to be supported by any jOOQ statement in the scope of this annotation.

    This annotation can be used at the use-site of jOOQ API at any given scope ElementType.PACKAGE, ElementType.TYPE, ElementType.METHOD in order to specify that the given scope allows ANY of the supplied SQLDialect to be supported by all usage of jOOQ API within the scope. For example:

     // Allow only MYSQL or ORACLE dialect support to be used within the class scope
     @Allow(MYSQL, ORACLE)
     public class MySQLAndOracleDAO {
         // Allow rule from class applies to this method
         public void mysqlAndOracleMethod() {
                .insertInto(TABLE, TABLE.COLUMN)
                // This type checks as it works on both MySQL and Oracle
                .set(TABLE.COLUMN, 2)
         // Refine class Allow rule with additional requirement
         public void oracleOnlyMethod() {
                .set(TABLE.COLUMN, 2)

    Type checking for these annotations can be supplied by org.jooq.checker.SQLDialectChecker from the jOOQ-checker module.


    Apart from the above main purpose, the Allow annotation also serves as a semantic namespace for other annotations, such as Allow.PlainSQL

    Lukas Eder
    See Also:
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      SQLDialect[] value
      A list of jOOQ SQLDialect which are required on any jOOQ API method that is annotated with Support.
    • Element Detail

      • value

        SQLDialect[] value
        A list of jOOQ SQLDialect which are required on any jOOQ API method that is annotated with Support.
        {org.jooq.SQLDialect.ACCESS, org.jooq.SQLDialect.ASE, org.jooq.SQLDialect.AURORA_MYSQL, org.jooq.SQLDialect.AURORA_POSTGRES, org.jooq.SQLDialect.COCKROACHDB, org.jooq.SQLDialect.DB2, org.jooq.SQLDialect.HANA, org.jooq.SQLDialect.INFORMIX, org.jooq.SQLDialect.INGRES, org.jooq.SQLDialect.MEMSQL, org.jooq.SQLDialect.ORACLE, org.jooq.SQLDialect.REDSHIFT, org.jooq.SQLDialect.SQLDATAWAREHOUSE, org.jooq.SQLDialect.SQLSERVER, org.jooq.SQLDialect.SYBASE, org.jooq.SQLDialect.TERADATA, org.jooq.SQLDialect.VERTICA, org.jooq.SQLDialect.CUBRID, org.jooq.SQLDialect.DEFAULT, org.jooq.SQLDialect.SQL99, org.jooq.SQLDialect.DERBY, org.jooq.SQLDialect.FIREBIRD, org.jooq.SQLDialect.H2, org.jooq.SQLDialect.HSQLDB, org.jooq.SQLDialect.MARIADB, org.jooq.SQLDialect.MYSQL, org.jooq.SQLDialect.POSTGRES, org.jooq.SQLDialect.SQLITE}