Package io.zero88.rsql
Interface LikeWildcardPattern
public interface LikeWildcardPattern
Represents for
wildcard pattern that is using in like/not-like comparison, is applied in the
REST query.- Since:
- 1.0.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LikeWildcardPatternThe default wildcard patternstatic final charstatic final charstatic final charstatic final LikeWildcardPatternThe regex wildcard pattern -
Method Summary
Modifier and TypeMethodDescriptiondefault StringConvert REST query argument to SQL query parameter based on the wildcard patterndefault charescape()Stands for escape character.booleanEnable using regular expression inlike/not-likecomparisonstatic Stringquote(char r, char escape) default charsingle()Stands for any single character.default charStands for any sequence of characters (including the empty sequence)
-
Field Details
-
JDBC_SEQ_CHAR
static final char JDBC_SEQ_CHAR- See Also:
-
JDBC_SINGLE_CHAR
static final char JDBC_SINGLE_CHAR- See Also:
-
JDBC_ESCAPE_CHAR
static final char JDBC_ESCAPE_CHAR- See Also:
-
DEFAULT
The default wildcard pattern -
REGEX
The regex wildcard pattern
-
-
Method Details
-
isRegexEnabled
boolean isRegexEnabled()Enable using regular expression inlike/not-likecomparison- Returns:
trueif enabled, otherwise isfalse
-
zeroOrMore
default char zeroOrMore()Stands for any sequence of characters (including the empty sequence)It will be omitted if
isRegexEnabled()istrue- Returns:
- the sequence pattern
-
single
default char single()Stands for any single character.It will be omitted if
isRegexEnabled()istrue- Returns:
- the single pattern
-
escape
default char escape()Stands for escape character.It will be omitted if
isRegexEnabled()istrue- Returns:
- the escape character
-
convert
Convert REST query argument to SQL query parameter based on the wildcard pattern- Parameters:
argument- the REST query argument- Returns:
- the SQL query parameter
-
quote
-