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:
ScriptFileNotFoundExceptionif a script file is not foundScriptExceptionif an exception is thrown while executing a scriptJdbcExceptionif a JDBC related error occurs
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe SQL block delimiter.boolean
-
Element Details
-
blockDelimiter
String blockDelimiterThe 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
-