WordPress / sqlite-database-integration

Feature Plugin to add SQLite support to WordPress. Under Development.
GNU General Public License v2.0
202 stars 30 forks source link

Add REGEXP_REPLACE support (including unit test) #120

Open Zodiac1978 opened 2 weeks ago

Zodiac1978 commented 2 weeks ago

Fixes #47

Zodiac1978 commented 2 weeks ago

Happy to get your review @bgrgicak ! :)

Zodiac1978 commented 2 weeks ago

@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

adamziel commented 2 weeks ago

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

adamziel commented 2 weeks ago

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