trunk_begins_cache.patch
| new/src/com/goldencode/p2j/persist/FQLPreprocessor.java 2026-10-07 08:00:38 +0000 | ||
|---|---|---|
| 775 | 778 |
*/ |
| 776 | 779 |
private boolean inlinedTernary = false; |
| 777 | 780 |
|
| 781 |
/** |
|
| 782 |
* Flag indicating if an unbracketed BEGINS built its re-check from the value of a parameter |
|
| 783 |
* pattern, thus caching by the where clause alone will not be possible. |
|
| 784 |
*/ |
|
| 785 |
private boolean inlinedBegins = false; |
|
| 786 |
|
|
| 778 | 787 |
/** Mapping of index positions for substitution parameters after rewrite */ |
| 779 | 788 |
private ParameterIndices paramIndices = null; |
| 780 | 789 |
|
| ... | ... | |
| 2033 | 2042 |
*/ |
| 2034 | 2043 |
boolean wasInlined() |
| 2035 | 2044 |
{
|
| 2036 |
return inline || inlinedTernary; |
|
| 2045 |
return inline || inlinedTernary || inlinedBegins;
|
|
| 2037 | 2046 |
} |
| 2038 | 2047 |
|
| 2039 | 2048 |
/** |
| ... | ... | |
| 3707 | 3716 | |
| 3708 | 3717 |
if (prefix == null) |
| 3709 | 3718 |
{
|
| 3719 |
// the re-check depends on the exact text of a parameter pattern |
|
| 3720 |
HQLAst literal = patternLiteral(pattern); |
|
| 3721 |
if (literal != null && literal.getType() == SUBST) |
|
| 3722 |
{
|
|
| 3723 |
inlinedBegins = true; |
|
| 3724 |
} |
|
| 3725 |
|
|
| 3710 | 3726 |
// unbracketed, the LIKE still needs the re-check's match on the trimmed prefix |
| 3711 | 3727 |
HQLAst trimmed = trimmedPrefix(pattern, value); |
| 3712 | 3728 | |