Package io.ebean.migration.ddl
Class DdlRunner
- java.lang.Object
-
- io.ebean.migration.ddl.DdlRunner
-
-
Constructor Summary
Constructors Constructor Description DdlRunner(boolean useAutoCommit, String scriptName)Construct with a script name (for logging) and flag indicating if auto commit is used (in which case errors are allowed).DdlRunner(boolean useAutoCommit, String scriptName, DdlAutoCommit ddlAutoCommit)Create specifying the auto commit behaviour (for the database platform).DdlRunner(boolean useAutoCommit, String scriptName, String platformName)Create specifying the database platform by name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>runAll(String content, Connection connection)Parse the content into sql statements and execute them in a transaction.intrunNonTransactional(Connection connection)Run any non-transactional statements from the just parsed script.intrunNonTransactional(Connection connection, List<String> nonTransactional)Run the non-transactional statements with auto commit true.
-
-
-
Constructor Detail
-
DdlRunner
public DdlRunner(boolean useAutoCommit, String scriptName)
Construct with a script name (for logging) and flag indicating if auto commit is used (in which case errors are allowed).
-
DdlRunner
public DdlRunner(boolean useAutoCommit, String scriptName, String platformName)
Create specifying the database platform by name.
-
DdlRunner
public DdlRunner(boolean useAutoCommit, String scriptName, DdlAutoCommit ddlAutoCommit)
Create specifying the auto commit behaviour (for the database platform).
-
-
Method Detail
-
runAll
public List<String> runAll(String content, Connection connection) throws SQLException
Parse the content into sql statements and execute them in a transaction.- Returns:
- The non-transactional statements that should execute later.
- Throws:
SQLException
-
runNonTransactional
public int runNonTransactional(Connection connection)
Run any non-transactional statements from the just parsed script.
-
runNonTransactional
public int runNonTransactional(Connection connection, List<String> nonTransactional)
Run the non-transactional statements with auto commit true.
-
-