Commit 86763dd
fix: correct escape & anchor handling in likeToRegex/regexToLike (#1174)
* fix: correct escape & anchor handling in likeToRegex/regexToLike
- treat \% \_ as literals, escape regex metachars, strip outer ^/$ only
- add unit tests to guarantee accurate LIKE ↔ regex round-trips
* Fix code format
Signed-off-by: Marvin Froeder <[email protected]>
---------
Signed-off-by: Marvin Froeder <[email protected]>
Co-authored-by: Marvin Froeder <[email protected]>1 parent 7876d3d commit 86763dd
File tree
2 files changed
+49
-5
lines changed- querydsl-libraries/querydsl-core/src
- main/java/com/querydsl/core/types
- test/java/com/querydsl/core/types
2 files changed
+49
-5
lines changedLines changed: 36 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
529 | 529 | | |
530 | 530 | | |
531 | 531 | | |
| 532 | + | |
532 | 533 | | |
533 | 534 | | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
534 | 547 | | |
535 | 548 | | |
536 | 549 | | |
| |||
601 | 614 | | |
602 | 615 | | |
603 | 616 | | |
604 | | - | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
605 | 627 | | |
606 | | - | |
| 628 | + | |
| 629 | + | |
607 | 630 | | |
608 | 631 | | |
609 | | - | |
| 632 | + | |
| 633 | + | |
610 | 634 | | |
611 | 635 | | |
612 | 636 | | |
| |||
616 | 640 | | |
617 | 641 | | |
618 | 642 | | |
619 | | - | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
620 | 647 | | |
621 | 648 | | |
622 | 649 | | |
623 | 650 | | |
624 | 651 | | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
625 | 655 | | |
626 | 656 | | |
627 | 657 | | |
628 | | - | |
| 658 | + | |
| 659 | + | |
629 | 660 | | |
630 | 661 | | |
631 | 662 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
74 | 87 | | |
75 | 88 | | |
76 | 89 | | |
| |||
0 commit comments