Package | Description |
---|---|
org.springframework.r2dbc.connection.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
R2dbcException from
R2DBC that we cannot pinpoint more precisely. |
Modifier and Type | Method and Description |
---|---|
static reactor.core.publisher.Mono<Void> |
ScriptUtils.executeSqlScript(io.r2dbc.spi.Connection connection,
EncodedResource resource)
Execute the given SQL script using default settings for statement
separators, comment delimiters, and exception handling flags.
|
static reactor.core.publisher.Mono<Void> |
ScriptUtils.executeSqlScript(io.r2dbc.spi.Connection connection,
EncodedResource resource,
DataBufferFactory dataBufferFactory,
boolean continueOnError,
boolean ignoreFailedDrops,
String[] commentPrefixes,
String separator,
String blockCommentStartDelimiter,
String blockCommentEndDelimiter)
Execute the given SQL script.
|
static reactor.core.publisher.Mono<Void> |
ScriptUtils.executeSqlScript(io.r2dbc.spi.Connection connection,
EncodedResource resource,
DataBufferFactory dataBufferFactory,
boolean continueOnError,
boolean ignoreFailedDrops,
String commentPrefix,
String separator,
String blockCommentStartDelimiter,
String blockCommentEndDelimiter)
Execute the given SQL script.
|
static reactor.core.publisher.Mono<Void> |
ScriptUtils.executeSqlScript(io.r2dbc.spi.Connection connection,
Resource resource)
Execute the given SQL script using default settings for statement
separators, comment delimiters, and exception handling flags.
|
reactor.core.publisher.Mono<Void> |
CompositeDatabasePopulator.populate(io.r2dbc.spi.Connection connection) |
reactor.core.publisher.Mono<Void> |
DatabasePopulator.populate(io.r2dbc.spi.Connection connection)
Populate, initialize, or clean up the database using the
provided R2DBC
Connection . |
reactor.core.publisher.Mono<Void> |
ResourceDatabasePopulator.populate(io.r2dbc.spi.Connection connection) |
static void |
ScriptUtils.splitSqlScript(EncodedResource resource,
String script,
String separator,
String[] commentPrefixes,
String blockCommentStartDelimiter,
String blockCommentEndDelimiter,
List<String> statements)
Split an SQL script into separate statements delimited by the provided
separator string.
|
static void |
ScriptUtils.splitSqlScript(EncodedResource resource,
String script,
String separator,
String commentPrefix,
String blockCommentStartDelimiter,
String blockCommentEndDelimiter,
List<String> statements)
Split an SQL script into separate statements delimited by the provided
separator string.
|
static void |
ScriptUtils.splitSqlScript(String script,
char separator,
List<String> statements)
Split an SQL script into separate statements delimited by the provided
separator character.
|
static void |
ScriptUtils.splitSqlScript(String script,
String separator,
List<String> statements)
Split an SQL script into separate statements delimited by the provided
separator string.
|