sqlite-database-integration icon indicating copy to clipboard operation
sqlite-database-integration copied to clipboard

Add REGEXP_REPLACE support (including unit test)

Open Zodiac1978 opened this issue 1 year ago • 4 comments

Fixes #47

Zodiac1978 avatar Jun 13 '24 12:06 Zodiac1978

Happy to get your review @bgrgicak ! :)

Zodiac1978 avatar Jun 13 '24 13:06 Zodiac1978

@adamziel I have now additionally added checks for if any of the required parameters are null.

Copying the result from MySQL:

If expr, pat, or repl is NULL, the return value is NULL. https://dev.mysql.com/doc/refman/8.4/en/regexp.html#function_regexp-replace

Zodiac1978 avatar Jun 13 '24 14:06 Zodiac1978

Actually, let’s also test for empty string pattern, not just a null one

adamziel avatar Jun 13 '24 14:06 adamziel

I just had a moment to review this in a more focused setting and I left a few more notes. It is pretty close!

adamziel avatar Jun 13 '24 17:06 adamziel