addScript to add a single SQL script location.
addScripts to add multiple SQL script locations.
populate to initialize or clean up the database using the configured scripts.
ScriptUtils
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private String | |
| private String[] | |
| private boolean | |
| private DataBufferFactory | |
| private boolean | |
| pack-priv List | |
| private String | |
| private Charset |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ResourceDatabasePopulator(Resource...
the scripts to execute to initialize or clean up the database (never scripts)null)Create a new |
| public | ResourceDatabasePopulator(boolean
flag to indicate that all failures in SQL should be
logged but not cause a failure continueOnError, boolean flag to indicate that a failed SQL ignoreFailedDrops, String DROP
statement can be ignoredthe encoding for the supplied SQL scripts
(may be sqlScriptEncoding, Resource... null or empty to indicate platform encoding)the scripts to execute to initialize or clean up the database
(never scripts)null)Construct a new |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | addScripts(Resource...
the scripts to execute (never scripts)null)Add multiple scripts to execute to initialize or clean up the database. |
| private void | |
| public Mono | populate(Connection
the R2DBC connection to use to populate the db;
already configured and ready to use, must not be connection)nullImplements org. Populate, initialize, or clean up the database using the
provided R2DBC |
| public void | setBlockCommentEndDelimiter(String
the end delimiter for block comments
(never blockCommentEndDelimiter)null or empty)Set the end delimiter that identifies block comments within the SQL scripts. |
| public void | setBlockCommentStartDelimiter(String
the start delimiter for block comments
(never blockCommentStartDelimiter)null or empty)Set the start delimiter that identifies block comments within the SQL scripts. |
| public void | setCommentPrefix(String
the prefix for single-line comments commentPrefix)Set the prefix that identifies single-line comments within the SQL scripts. |
| public void | setCommentPrefixes(String...
the prefixes for single-line comments commentPrefixes)Set the prefixes that identify single-line comments within the SQL scripts. |
| public void | setContinueOnError(boolean
true if script execution should continue on errorFlag to indicate that all failures in SQL should be logged but not cause a failure. |
| public void | setDataBufferFactory(DataBufferFactory
the dataBufferFactory)DataBufferFactory to use, must not be nullSet the |
| public void | setIgnoreFailedDrops(boolean
true if failed drop statements should be ignoredFlag to indicate that a failed SQL |
| public void | setScripts(Resource...
the scripts to execute (never scripts)null)Set the scripts to execute to initialize or clean up the database, replacing any previously added scripts. |
| public void | setSeparator(String
the script statement separator separator)Specify the statement separator, if a custom one. |
| public void | setSqlScriptEncoding(String
the encoding used in scripts
(may be sqlScriptEncoding)null or empty to indicate platform encoding)Specify the encoding for the configured SQL scripts, if different from the platform encoding. |
| public void | setSqlScriptEncoding(Charset
the encoding used in scripts
(may be sqlScriptEncoding)null or empty to indicate platform encoding)Specify the encoding for the configured SQL scripts, if different from the platform encoding. |
| blockCommentEndDelimiter | back to summary |
|---|---|
| private String blockCommentEndDelimiter | |
| blockCommentStartDelimiter | back to summary |
|---|---|
| private String blockCommentStartDelimiter | |
| commentPrefixes | back to summary |
|---|---|
| private String[] commentPrefixes | |
| continueOnError | back to summary |
|---|---|
| private boolean continueOnError | |
| dataBufferFactory | back to summary |
|---|---|
| private DataBufferFactory dataBufferFactory | |
| ignoreFailedDrops | back to summary |
|---|---|
| private boolean ignoreFailedDrops | |
| scripts | back to summary |
|---|---|
| pack-priv List<Resource> scripts | |
| separator | back to summary |
|---|---|
| private String separator | |
| sqlScriptEncoding | back to summary |
|---|---|
| private Charset sqlScriptEncoding
| |
| ResourceDatabasePopulator | back to summary |
|---|---|
| public ResourceDatabasePopulator() Create a new | |
| ResourceDatabasePopulator | back to summary |
|---|---|
| public ResourceDatabasePopulator(Resource... scripts) Create a new
| |
| ResourceDatabasePopulator | back to summary |
|---|---|
| public ResourceDatabasePopulator(boolean continueOnError, boolean ignoreFailedDrops, String sqlScriptEncoding, Resource... scripts) Construct a new
| |
| addScript | back to summary |
|---|---|
| public void addScript(Resource script) Add a script to execute to initialize or clean up the database.
| |
| addScripts | back to summary |
|---|---|
| public void addScripts(Resource... scripts) Add multiple scripts to execute to initialize or clean up the database.
| |
| assertContentsOfScriptArray | back to summary |
|---|---|
| private void assertContentsOfScriptArray(Resource... scripts) | |
| populate | back to summary |
|---|---|
| public Mono Implements org. Doc from org. Populate, initialize, or clean up the database using the
provided R2DBC
| |
| setBlockCommentEndDelimiter | back to summary |
|---|---|
| public void setBlockCommentEndDelimiter(String blockCommentEndDelimiter) Set the end delimiter that identifies block comments within the SQL scripts. Defaults to
| |
| setBlockCommentStartDelimiter | back to summary |
|---|---|
| public void setBlockCommentStartDelimiter(String blockCommentStartDelimiter) Set the start delimiter that identifies block comments within the SQL scripts. Defaults to
| |
| setCommentPrefix | back to summary |
|---|---|
| public void setCommentPrefix(String commentPrefix) Set the prefix that identifies single-line comments within the SQL scripts. Defaults to
| |
| setCommentPrefixes | back to summary |
|---|---|
| public void setCommentPrefixes(String... commentPrefixes) Set the prefixes that identify single-line comments within the SQL scripts. Defaults to
| |
| setContinueOnError | back to summary |
|---|---|
| public void setContinueOnError(boolean continueOnError) Flag to indicate that all failures in SQL should be logged but not cause a failure. Defaults to
| |
| setDataBufferFactory | back to summary |
|---|---|
| public void setDataBufferFactory(DataBufferFactory dataBufferFactory) Set the Defaults to
| |
| setIgnoreFailedDrops | back to summary |
|---|---|
| public void setIgnoreFailedDrops(boolean ignoreFailedDrops) Flag to indicate that a failed SQL This is useful for a non-embedded database whose SQL dialect does not
support an The default is
| |
| setScripts | back to summary |
|---|---|
| public void setScripts(Resource... scripts) Set the scripts to execute to initialize or clean up the database, replacing any previously added scripts.
| |
| setSeparator | back to summary |
|---|---|
| public void setSeparator(String separator) Specify the statement separator, if a custom one. Defaults to
| |
| setSqlScriptEncoding | back to summary |
|---|---|
| public void setSqlScriptEncoding(String sqlScriptEncoding) Specify the encoding for the configured SQL scripts, if different from the platform encoding.
| |
| setSqlScriptEncoding | back to summary |
|---|---|
| public void setSqlScriptEncoding(Charset sqlScriptEncoding) Specify the encoding for the configured SQL scripts, if different from the platform encoding.
| |