Package | Description |
---|---|
org.springframework.jdbc.datasource.init |
Provides extensible support for initializing databases through scripts.
|
Modifier and Type | Class and Description |
---|---|
class |
CannotReadScriptException
Thrown by
ScriptUtils if an SQL script cannot be read. |
class |
ScriptParseException
Thrown by
ScriptUtils if an SQL script cannot be properly parsed. |
class |
ScriptStatementFailedException
Thrown by
ScriptUtils if a statement in an SQL script failed when
executing it against the target database. |
class |
UncategorizedScriptException
Thrown when we cannot determine anything more specific than "something went
wrong while processing an SQL script": for example, a
SQLException
from JDBC that we cannot pinpoint more precisely. |
Modifier and Type | Method and Description |
---|---|
void |
ResourceDatabasePopulator.execute(javax.sql.DataSource dataSource)
Execute this
ResourceDatabasePopulator against the given
DataSource . |
static void |
ScriptUtils.executeSqlScript(java.sql.Connection connection,
EncodedResource resource)
Execute the given SQL script using default settings for statement
separators, comment delimiters, and exception handling flags.
|
static void |
ScriptUtils.executeSqlScript(java.sql.Connection connection,
EncodedResource resource,
boolean continueOnError,
boolean ignoreFailedDrops,
java.lang.String commentPrefix,
java.lang.String separator,
java.lang.String blockCommentStartDelimiter,
java.lang.String blockCommentEndDelimiter)
Execute the given SQL script.
|
static void |
ScriptUtils.executeSqlScript(java.sql.Connection connection,
Resource resource)
Execute the given SQL script using default settings for statement
separators, comment delimiters, and exception handling flags.
|
void |
ResourceDatabasePopulator.populate(java.sql.Connection connection)
Populate, initialize, or clean up the database using the provided JDBC
connection.
|
void |
DatabasePopulator.populate(java.sql.Connection connection)
Populate, initialize, or clean up the database using the provided JDBC
connection.
|
void |
CompositeDatabasePopulator.populate(java.sql.Connection connection) |
static void |
ScriptUtils.splitSqlScript(EncodedResource resource,
java.lang.String script,
java.lang.String separator,
java.lang.String commentPrefix,
java.lang.String blockCommentStartDelimiter,
java.lang.String blockCommentEndDelimiter,
java.util.List<java.lang.String> statements)
Split an SQL script into separate statements delimited by the provided
separator string.
|
static void |
ScriptUtils.splitSqlScript(java.lang.String script,
char separator,
java.util.List<java.lang.String> statements)
Split an SQL script into separate statements delimited by the provided
separator character.
|
static void |
ScriptUtils.splitSqlScript(java.lang.String script,
java.lang.String separator,
java.util.List<java.lang.String> statements)
Split an SQL script into separate statements delimited by the provided
separator string.
|