Module regex

Module regex 

Source

Structsยง

OperatorMode ๐Ÿ”’

Constantsยง

ANY_CHAR_REGEX_PATTERN ๐Ÿ”’
MAX_REGEX_ALTERNATIONS_EXPANSION ๐Ÿ”’
Maximum number of regex alternations (foo|bar|...) that will be expanded into multiple LIKE expressions.

Functionsยง

anchored_alternation_to_exprs ๐Ÿ”’
anchored_literal_to_expr ๐Ÿ”’
Extracts a string literal expression assuming that is_anchored_literal returned true.
collect_concat_to_like_string ๐Ÿ”’
is_anchored_capture ๐Ÿ”’
Returns true if the elements in a Concat pattern are:
is_anchored_literal ๐Ÿ”’
Returns true if the elements in a Concat pattern are:
is_safe_for_like ๐Ÿ”’
like_str_from_literal ๐Ÿ”’
Returns a str represented by Literal if it contains a valid utf8 sequence and is safe for like (has no โ€˜%โ€™ and โ€˜_โ€™)
lower_alt ๐Ÿ”’
Calls lower_simple for each alternative and combine the results with or or and based on OperatorMode. Any fail attempt to lower an alternative will makes this function to return None.
lower_simple ๐Ÿ”’
Tries to lower (transform) a simple regex pattern to a LIKE expression.
partial_anchored_literal_to_like ๐Ÿ”’
Returns the LIKE pattern if the Concat pattern is partial anchored:
simplify_regex_expr
Tries to convert a regexp expression to a LIKE or Eq/NotEq expression.
str_from_literal ๐Ÿ”’
Returns a str represented by Literal if it contains a valid utf8