Package org.apache.flink.table.functions
Class SqlLikeUtils
- java.lang.Object
-
- org.apache.flink.table.functions.SqlLikeUtils
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
ilike(String s, String patternStr)
SQLILIKE
function.static boolean
ilike(String s, String patternStr, String escape)
SQLILIKE
function with escape.static RuntimeException
invalidEscapeCharacter(String s)
static RuntimeException
invalidEscapeSequence(String s, int i)
static boolean
like(String s, String pattern)
SQLLIKE
function.static boolean
like(String s, String pattern, String escape)
SQLLIKE
function with escape.static boolean
similar(String s, String pattern)
SQLSIMILAR
function.static boolean
similar(String s, String pattern, String escape)
SQLSIMILAR
function with escape.static String
sqlToRegexLike(String sqlPattern, CharSequence escapeStr)
Translates a SQL LIKE pattern to Java regex pattern, with optional escape string.static String
sqlToRegexSimilar(String sqlPattern, char escapeChar)
Translates SQL SIMILAR pattern to Java regex pattern.static String
sqlToRegexSimilar(String sqlPattern, CharSequence escapeStr)
Translates a SQL SIMILAR pattern to Java regex pattern, with optional escape string.
-
-
-
Method Detail
-
like
public static boolean like(String s, String pattern, String escape)
SQLLIKE
function with escape.
-
ilike
public static boolean ilike(String s, String patternStr, String escape)
SQLILIKE
function with escape.
-
similar
public static boolean similar(String s, String pattern, String escape)
SQLSIMILAR
function with escape.
-
sqlToRegexLike
public static String sqlToRegexLike(String sqlPattern, CharSequence escapeStr)
Translates a SQL LIKE pattern to Java regex pattern, with optional escape string.
-
invalidEscapeCharacter
public static RuntimeException invalidEscapeCharacter(String s)
-
invalidEscapeSequence
public static RuntimeException invalidEscapeSequence(String s, int i)
-
sqlToRegexSimilar
public static String sqlToRegexSimilar(String sqlPattern, CharSequence escapeStr)
Translates a SQL SIMILAR pattern to Java regex pattern, with optional escape string.
-
-