Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CBRD-24563] [p11_2] Add RE2 regexp library as a backend for regular expression functions #4057

Merged
merged 7 commits into from
Jan 17, 2023

Commits on Jan 17, 2023

  1. [CBRD-24563] Add RE2 for REGEXP functions (CUBRID#3997)

    http://jira.cubrid.org/browse/CBRD-24563
    
    Implementation
    
    Move c++ implementation to string_regex_std.cpp
    Implement RE2 implementation in string_regex_re2.cpp
    Implement a common routine of regexp functions in string_regex.cpp
    C++ uses UTF-16 (wide string). But RE2 only supports UTF-8. Converting to UTF-8 to perform correctly for RE2 is required
    Implement functions that convert from/to string represented with a codeset (any codeset <-> utf-8)
    Refactor functions that convert from/to wstring. In C++ utf-8 string <-> wstring are supported. So the above functions are used in the functions.
    For RE2, Implement a function to split a string by position considering utf-8 codeset: re2_split_string ()
    For RE2, Implement a function to get a distance between two positions in a string considering utf-8 codeset: re2_distance_utf8 ()
    Add a system parameter (regexp_engine) to choose the regexp backend library.
    hgryoo committed Jan 17, 2023
    Configuration menu
    Copy the full SHA
    aabd635 View commit details
    Browse the repository at this point in the history
  2. [CBRD-24563] Change regexp_engine system parameter to PRM_KEYWORD type (

    CUBRID#4033)
    
    http://jira.cubrid.org/browse/CBRD-24563
    
    PRM_KEYWORD is a better approach to validate the parameter value.
    I've changed regexp_engine to PRM_KEYWORD type and set lower and upper values.
    hgryoo committed Jan 17, 2023
    Configuration menu
    Copy the full SHA
    03cddaf View commit details
    Browse the repository at this point in the history
  3. fix conflict

    hgryoo committed Jan 17, 2023
    Configuration menu
    Copy the full SHA
    8233f99 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    70b31f7 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    06a340f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f04d100 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    08254e9 View commit details
    Browse the repository at this point in the history