SQLFunction implementation that emulates the ANSI SQL trim function
on dialects which do not support the full definition. However, this function
definition does assume the availability of ltrim, rtrim, and replace functions
which it uses in various combinations to emulate the desired ANSI trim()
functionality.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | BOTH_SPACE_TRIM_FROM_TEMPLATE
The SQLFunctionTemplate pattern for the trimming both leading and trailing spaces, with the optional FROM keyword. |
| public static final String | BOTH_SPACE_TRIM_TEMPLATE
The SQLFunctionTemplate pattern for the trimming both leading and trailing spaces |
| public static final String | BOTH_TRIM_TEMPLATE
A template for the series of calls required to trim non-space chars from both the beginning and the end of text. |
| private final SQLFunction | |
| private final SQLFunction | |
| private final SQLFunction | |
| public static final String | LEADING_SPACE_TRIM_TEMPLATE
The SQLFunctionTemplate pattern for the trimming leading spaces |
| public static final String | LEADING_TRIM_TEMPLATE
A template for the series of calls required to trim non-space chars from the beginning of text. |
| private final SQLFunction | |
| private final SQLFunction | |
| public static final String | LTRIM
The default |
| public static final String | REPLACE
The default |
| public static final String | RTRIM
The default |
| public static final String | SPACE_PLACEHOLDER
The placeholder used to represent whitespace |
| public static final String | TRAILING_SPACE_TRIM_TEMPLATE
The SQLFunctionTemplate pattern for the trimming trailing spaces |
| public static final String | TRAILING_TRIM_TEMPLATE
A template for the series of calls required to trim non-space chars from the end of text. |
| private final SQLFunction | |
| private final SQLFunction |
| Access | Constructor and Description |
|---|---|
| public | AnsiTrimEmulationFunction()
Constructs a new AnsiTrimEmulationFunction using |
| public | AnsiTrimEmulationFunction(String
The left trim function to use. ltrimFunctionName, String The right trim function to use. rtrimFunctionName, String The replace function to use. replaceFunctionName)Constructs a trim() emulation function definition using the specified function calls. |
| Modifier and Type | Method and Description |
|---|---|
| protected SQLFunction | resolveBothSpaceTrimFromFunction()
Implements abstract org. |
| protected SQLFunction | resolveBothSpaceTrimFunction()
Implements abstract org. |
| protected SQLFunction | resolveBothTrimFunction()
Implements abstract org. |
| protected SQLFunction | resolveLeadingSpaceTrimFunction()
Implements abstract org. |
| protected SQLFunction | resolveLeadingTrimFunction()
Implements abstract org. |
| protected SQLFunction | resolveTrailingSpaceTrimFunction()
Implements abstract org. |
| protected SQLFunction | resolveTrailingTrimFunction()
Implements abstract org. |
| BOTH_SPACE_TRIM_FROM_TEMPLATE | back to summary |
|---|---|
| public static final String BOTH_SPACE_TRIM_FROM_TEMPLATE The SQLFunctionTemplate pattern for the trimming both leading and trailing spaces, with the optional FROM keyword. Different because we need to skip the FROM keyword in the SQLFunctionTemplate processing | |
| BOTH_SPACE_TRIM_TEMPLATE | back to summary |
|---|---|
| public static final String BOTH_SPACE_TRIM_TEMPLATE The SQLFunctionTemplate pattern for the trimming both leading and trailing spaces | |
| BOTH_TRIM_TEMPLATE | back to summary |
|---|---|
| public static final String BOTH_TRIM_TEMPLATE A template for the series of calls required to trim non-space chars from both the beginning and the end of text. Note again, we have a series of calls that is essentially the same as outlined in | |
| bothSpaceTrim | back to summary |
|---|---|
| private final SQLFunction bothSpaceTrim | |
| bothSpaceTrimFrom | back to summary |
|---|---|
| private final SQLFunction bothSpaceTrimFrom | |
| bothTrim | back to summary |
|---|---|
| private final SQLFunction bothTrim | |
| LEADING_SPACE_TRIM_TEMPLATE | back to summary |
|---|---|
| public static final String LEADING_SPACE_TRIM_TEMPLATE The SQLFunctionTemplate pattern for the trimming leading spaces | |
| LEADING_TRIM_TEMPLATE | back to summary |
|---|---|
| public static final String LEADING_TRIM_TEMPLATE A template for the series of calls required to trim non-space chars from the beginning of text. NOTE : essentially we:
| |
| leadingSpaceTrim | back to summary |
|---|---|
| private final SQLFunction leadingSpaceTrim | |
| leadingTrim | back to summary |
|---|---|
| private final SQLFunction leadingTrim | |
| LTRIM | back to summary |
|---|---|
| public static final String LTRIM The default | |
| REPLACE | back to summary |
|---|---|
| public static final String REPLACE The default | |
| RTRIM | back to summary |
|---|---|
| public static final String RTRIM The default | |
| SPACE_PLACEHOLDER | back to summary |
|---|---|
| public static final String SPACE_PLACEHOLDER The placeholder used to represent whitespace | |
| TRAILING_SPACE_TRIM_TEMPLATE | back to summary |
|---|---|
| public static final String TRAILING_SPACE_TRIM_TEMPLATE The SQLFunctionTemplate pattern for the trimming trailing spaces | |
| TRAILING_TRIM_TEMPLATE | back to summary |
|---|---|
| public static final String TRAILING_TRIM_TEMPLATE A template for the series of calls required to trim non-space chars from the end of text. Note essentially the same series of calls as outlined in | |
| trailingSpaceTrim | back to summary |
|---|---|
| private final SQLFunction trailingSpaceTrim | |
| trailingTrim | back to summary |
|---|---|
| private final SQLFunction trailingTrim | |
| AnsiTrimEmulationFunction | back to summary |
|---|---|
| public AnsiTrimEmulationFunction() Constructs a new AnsiTrimEmulationFunction using | |
| AnsiTrimEmulationFunction | back to summary |
|---|---|
| public AnsiTrimEmulationFunction(String ltrimFunctionName, String rtrimFunctionName, String replaceFunctionName) Constructs a trim() emulation function definition using the specified function calls. | |
| resolveBothSpaceTrimFromFunction | back to summary |
|---|---|
| protected SQLFunction resolveBothSpaceTrimFromFunction() Implements abstract org. Doc from org. Resolve the function definition which should be used to trim both leading and trailing spaces.
The same as {#link resolveBothSpaceTrimFunction} except that here theFROM is included and
will need to be accounted for during
| |
| resolveBothSpaceTrimFunction | back to summary |
|---|---|
| protected SQLFunction resolveBothSpaceTrimFunction() Implements abstract org. Doc from org. Resolve the function definition which should be used to trim both leading and trailing spaces. In this form, the input arguments is missing the FROM keyword.
| |
| resolveBothTrimFunction | back to summary |
|---|---|
| protected SQLFunction resolveBothTrimFunction() Implements abstract org. Doc from org. Resolve the function definition which should be used to trim the specified character from both the beginning (leading) and end (trailing) of the trim source.
| |
| resolveLeadingSpaceTrimFunction | back to summary |
|---|---|
| protected SQLFunction resolveLeadingSpaceTrimFunction() Implements abstract org. Doc from org. Resolve the function definition which should be used to trim leading spaces.
| |
| resolveLeadingTrimFunction | back to summary |
|---|---|
| protected SQLFunction resolveLeadingTrimFunction() Implements abstract org. Doc from org. Resolve the function definition which should be used to trim the specified character from the beginning (leading) of the trim source.
| |
| resolveTrailingSpaceTrimFunction | back to summary |
|---|---|
| protected SQLFunction resolveTrailingSpaceTrimFunction() Implements abstract org. Doc from org. Resolve the function definition which should be used to trim trailing spaces.
| |
| resolveTrailingTrimFunction | back to summary |
|---|---|
| protected SQLFunction resolveTrailingTrimFunction() Implements abstract org. Doc from org. Resolve the function definition which should be used to trim the specified character from the end (trailing) of the trim source.
| |