|
|
|
@ -24,6 +24,7 @@ import java.util.Locale;
|
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.Properties; |
|
|
|
|
import java.util.Set; |
|
|
|
|
import java.util.regex.Pattern; |
|
|
|
|
|
|
|
|
|
import com.fr.third.org.hibernate.HibernateException; |
|
|
|
|
import com.fr.third.org.hibernate.LockMode; |
|
|
|
@ -140,6 +141,9 @@ public abstract class Dialect implements ConversionContext {
|
|
|
|
|
*/ |
|
|
|
|
public static final String CLOSED_QUOTE = "`\"]"; |
|
|
|
|
|
|
|
|
|
private static final Pattern ESCAPE_CLOSING_COMMENT_PATTERN = Pattern.compile("\\*/"); |
|
|
|
|
private static final Pattern ESCAPE_OPENING_COMMENT_PATTERN = Pattern.compile("/\\*"); |
|
|
|
|
|
|
|
|
|
private final TypeNames typeNames = new TypeNames(); |
|
|
|
|
private final TypeNames hibernateTypeNames = new TypeNames(); |
|
|
|
|
|
|
|
|
@ -2738,6 +2742,14 @@ public abstract class Dialect implements ConversionContext {
|
|
|
|
|
return StandardCallableStatementSupport.NO_REF_CURSOR_INSTANCE; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static String escapeComment(String comment) { |
|
|
|
|
if (StringHelper.isNotEmpty(comment)) { |
|
|
|
|
final String escaped = ESCAPE_CLOSING_COMMENT_PATTERN.matcher(comment).replaceAll("*\\\\/"); |
|
|
|
|
return ESCAPE_OPENING_COMMENT_PATTERN.matcher(escaped).replaceAll("/\\\\*"); |
|
|
|
|
} |
|
|
|
|
return comment; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* By default interpret this based on DatabaseMetaData. |
|
|
|
|
* |
|
|
|
|