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

Support for MySQL LEFT() function #86

Closed adamziel closed 2 months ago

adamziel commented 2 months ago

Documented at https://dev.mysql.com/doc/refman/8.3/en/string-functions.html#function_left, the LEFT() function returns the leftmost len characters from the string str, or NULL if any argument is NULL.

This PR rewrites the LEFT() calls into SUBSTRING() calls.

Also adds WordPress polyfills to enable running PHPUnit tests.

Test with this command:

./vendor/bin/phpunit -c ./phpunit.xml.dist --filter testLeft