-
Notifications
You must be signed in to change notification settings - Fork 38k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add multi-prefix comment support for SQL scripts #23289
Closed
philwebb
wants to merge
2
commits into
spring-projects:master
from
philwebb:resource-database-populator
Closed
Add multi-prefix comment support for SQL scripts #23289
philwebb
wants to merge
2
commits into
spring-projects:master
from
philwebb:resource-database-populator
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update `ResourceDatabasePopulator` and `ScriptUtils` so that more than one comment prefix can be used when processing SQL scripts. This feature is particularly useful when dealing with scripts provided by Quartz since they often use a mix `--` and `#`. Closes spring-projectsgh-23289
philwebb
force-pushed
the
resource-database-populator
branch
from
July 14, 2019 11:20
3ad1741
to
90ac554
Compare
spring-projects-issues
added
the
status: waiting-for-triage
An issue we've not yet triaged or decided on
label
Jul 14, 2019
sbrannen
added
in: data
Issues in data modules (jdbc, orm, oxm, tx)
type: enhancement
A general enhancement
labels
Jul 14, 2019
sbrannen
requested changes
Jul 14, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the PR looks pretty good. I only requested a few minor changes for the Javadoc and preconditions.
Thanks for simplifying ScriptUtilsUnitTests
as well.
...g-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ResourceDatabasePopulator.java
Show resolved
Hide resolved
...g-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ResourceDatabasePopulator.java
Show resolved
Hide resolved
spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ScriptUtils.java
Show resolved
Hide resolved
spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ScriptUtils.java
Show resolved
Hide resolved
spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ScriptUtils.java
Show resolved
Hide resolved
spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ScriptUtils.java
Show resolved
Hide resolved
spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ScriptUtils.java
Show resolved
Hide resolved
spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ScriptUtils.java
Show resolved
Hide resolved
spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ScriptUtils.java
Show resolved
Hide resolved
sbrannen
removed
the
status: waiting-for-triage
An issue we've not yet triaged or decided on
label
Jul 14, 2019
1 task
See also gh-23331. |
This comment has been minimized.
This comment has been minimized.
sbrannen
added a commit
to sbrannen/spring-framework
that referenced
this pull request
Jul 24, 2019
spring-projectsgh-23289 introduced support for multiple single-line comment prefixes for ScriptUtils, ResourceDatabasePopulator, and EmbeddedDatabaseBuilder. This commit adds the same support for @SqlConfig in the TestContext Framework. Specifically, @SqlConfig has a new `commentPrefixes` attribute for setting multiple single-line comment prefixes. Closes spring-projectsgh-23331
sbrannen
added a commit
to sbrannen/spring-framework
that referenced
this pull request
Jul 24, 2019
spring-projectsgh-23289 introduced support for multiple single-line comment prefixes for ScriptUtils, ResourceDatabasePopulator, and EmbeddedDatabaseBuilder. This commit adds the same support for @SqlConfig in the TestContext Framework. Specifically, @SqlConfig has a new `commentPrefixes` attribute for setting multiple single-line comment prefixes. Closes spring-projectsgh-23331
sbrannen
added a commit
that referenced
this pull request
May 12, 2021
lxbzmy
pushed a commit
to lxbzmy/spring-framework
that referenced
this pull request
Mar 26, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to fix this Spring Boot issue we'd like to be able to process quartz SQL scripts that contain comments starting with
#
or--
. Currently our support is limited to just a single prefix.This pull request adds multi-prefix support to both
ResourceDatabasePopulator
andScriptUtils
.