public class SqlLikeUtils extends Object
LIKE
and SIMILAR
operators to regular expressions.
Note: THIS IS COPIED FROM CALCITE to EXPOSE SOME PRIVATE METHOD
Modifier and Type | Method and Description |
---|---|
static RuntimeException |
invalidEscapeCharacter(String s) |
static RuntimeException |
invalidEscapeSequence(String s,
int i) |
static String |
sqlToRegexLike(String sqlPattern,
CharSequence escapeStr)
Translates a SQL LIKE pattern to Java regex pattern, with optional escape string.
|
public static String sqlToRegexLike(String sqlPattern, CharSequence escapeStr)
public static RuntimeException invalidEscapeCharacter(String s)
public static RuntimeException invalidEscapeSequence(String s, int i)
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.