normalizeTriggerBody normalizes trigger body for comparison
(body string)
| 1446 | |
| 1447 | // normalizeTriggerBody normalizes trigger body for comparison |
| 1448 | func normalizeTriggerBody(body string) string { |
| 1449 | if body == "" { |
| 1450 | return "" |
| 1451 | } |
| 1452 | |
| 1453 | // Aggressive normalization: remove ALL whitespace for comparison |
| 1454 | // This handles cases where ANTLR GetText() strips whitespace |
| 1455 | normalized := strings.ReplaceAll(body, " ", "") |
| 1456 | normalized = strings.ReplaceAll(normalized, "\r\n", "") |
| 1457 | normalized = strings.ReplaceAll(normalized, "\r", "") |
| 1458 | normalized = strings.ReplaceAll(normalized, "\n", "") |
| 1459 | normalized = strings.ReplaceAll(normalized, "\t", "") |
| 1460 | |
| 1461 | // Convert to uppercase for case-insensitive comparison |
| 1462 | normalized = strings.ToUpper(normalized) |
| 1463 | |
| 1464 | return normalized |
| 1465 | } |
| 1466 | |
| 1467 | // partitionsEqual checks if two partitions are equal. |
| 1468 | func partitionsEqual(engine storepb.Engine, part1, part2 *storepb.TablePartitionMetadata) bool { |