solomax commented on code in PR #304:
URL: https://github.com/apache/openjpa/pull/304#discussion_r4550321806
##########
openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/identifier/Normalizer.java:
##########
@@ -71,6 +71,24 @@ public static String normalizeString(String name) {
return name;
}
+ /**
+ * Normalizes a single part name with the given rule rather than the
+ * default rule, such as the rule of a dictionary that delimits its
+ * reserved words.
+ * @param name
+ * @param rule
+ * @since 4.2.0
+ */
+ public static String normalizeString(String name, IdentifierRule rule) {
+ if (StringUtil.isEmpty(name)) {
+ return name;
+ }
+ if (!normalizer.isDelimited(rule, name)) {
Review Comment:
This is what I can't understand :(
`Normalizer` static methods are still being widely used by `DBIdentifier`
and `QualifiedDBIdentifier`
as well as inside `*DBDictionary` ...
Is it safe to have static version having zero reserved words and performs no
real escaping
And per-database fully-equipped instance?
I do remember I spend time to figure out what is happening ... :(
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]