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
Modifier and TypeFieldDescriptionstatic final LikeWildcardPattern
The default wildcard patternstatic final char
static final char
static final char
static final LikeWildcardPattern
The regex wildcard pattern -
Method Summary
Modifier and TypeMethodDescriptiondefault String
Convert REST query argument to SQL query parameter based on the wildcard patterndefault char
escape()
Stands for escape character.boolean
Enable using regular expression inlike
/not-like
comparisonstatic String
quote
(char r, char escape) default char
single()
Stands for any single character.default char
Stands 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-like
comparison- Returns:
true
if 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
-