public class DdlGenerator extends Object
| Constructor and Description |
|---|
DdlGenerator(com.avaje.ebeaninternal.api.SpiEbeanServer server,
ServerConfig serverConfig) |
| Modifier and Type | Method and Description |
|---|---|
protected com.avaje.ebean.dbmigration.model.CurrentModel |
currentModel() |
void |
execute(boolean online)
Generate the DDL and then run the DDL based on property settings
(ebean.ddl.generate and ebean.ddl.run etc).
|
protected String |
generateCreateAllDdl() |
protected void |
generateDdl()
Generate the DDL drop and create scripts if the properties have been set.
|
protected String |
generateDropAllDdl() |
protected ClassLoader |
getClassLoader()
Return the classLoader to use to read sql scripts as resources.
|
protected String |
getCreateFileName() |
protected String |
getDropFileName() |
protected String |
readContent(Reader reader) |
protected String |
readFile(String fileName) |
protected void |
runCreateSql() |
protected void |
runDdl()
Run the DDL drop and DDL create scripts if properties have been set.
|
protected void |
runDropSql() |
protected void |
runInitSql() |
protected void |
runResourceScript(String sqlScript) |
int |
runScript(boolean expectErrors,
String content,
String scriptName)
Execute all the DDL statements in the script.
|
protected void |
runSeedSql() |
protected void |
writeCreate(String createFile) |
protected void |
writeDrop(String dropFile) |
protected void |
writeFile(String fileName,
String fileContent) |
public DdlGenerator(com.avaje.ebeaninternal.api.SpiEbeanServer server, ServerConfig serverConfig)
public void execute(boolean online)
protected void generateDdl()
protected void runDdl()
public int runScript(boolean expectErrors, String content, String scriptName)
protected void runDropSql() throws IOException
IOExceptionprotected void runCreateSql() throws IOException
IOExceptionprotected void runInitSql() throws IOException
IOExceptionprotected void runSeedSql() throws IOException
IOExceptionprotected void runResourceScript(String sqlScript) throws IOException
IOExceptionprotected ClassLoader getClassLoader()
protected void writeCreate(String createFile)
protected String generateDropAllDdl()
protected String generateCreateAllDdl()
protected String getDropFileName()
protected String getCreateFileName()
protected com.avaje.ebean.dbmigration.model.CurrentModel currentModel()
protected void writeFile(String fileName, String fileContent) throws IOException
IOExceptionprotected String readFile(String fileName) throws IOException
IOExceptionprotected String readContent(Reader reader) throws IOException
IOExceptionCopyright © 2016. All rights reserved.