Skip to content

Commit

Permalink
fix h2 converter
Browse files Browse the repository at this point in the history
  • Loading branch information
vdiskg committed Feb 2, 2024
1 parent 4941f4f commit 06afabb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,15 @@ private static String convertTableConfig(String convertedText, SqlStatement sqlS
}

private static final Pattern INDEX_NAME_PATTERN = Pattern.compile(
"KEY\\s*(`)?(?<indexName>[a-zA-Z0-9\\-_]+)(`)?", Pattern.CASE_INSENSITIVE);
"(KEY\\s*`|KEY\\s+)(?<indexName>[a-zA-Z0-9\\-_]+)(`)?", Pattern.CASE_INSENSITIVE);

private static String convertIndexWithTable(String convertedText, String tableName,
SqlStatement sqlStatement) {
String[] lines = convertedText.split("\n");
StringJoiner joiner = new StringJoiner("\n");
for (String line : lines) {
String convertedLine = line;
if (convertedLine.contains("KEY")) {
if (convertedLine.contains("KEY") || convertedLine.contains("key")) {
// replace index name
// KEY `AppId_ClusterName_GroupName` (`AppId`,`ClusterName`(191),`NamespaceName`(191))
// ->
Expand Down

0 comments on commit 06afabb

Please sign in to comment.