Annotation Interface Script


@Target(METHOD) @Retention(RUNTIME) public @interface Script
Indicates a database script execution.

The annotated method must be a member of a Dao annotated interface.

 @Dao
 public interface EmployeeDao {

     @Script
     void createTables();
 }
 
The method may throw following exceptions:
  • Element Details

    • blockDelimiter

      String blockDelimiter
      The SQL block delimiter.

      The SQL block delimiter is a mark that indicates the end of definition of such as stored procedures, stored functions and triggers.

      If not specified, the return value of Dialect.getScriptBlockDelimiter() is used.

      Returns:
      the delimiter
      Default:
      ""
    • haltOnError

      boolean haltOnError
      Returns:
      whether to halt a script execution when an error occurs.
      Default:
      true
    • sqlLog

      SqlLogType sqlLog
      Returns:
      the output format of SQL logs.
      Default:
      FORMATTED