WordPress / WordPress/sqlite-database-integration
Date operations not supported
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 363
- Forks
- 67
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 7
Description
The plugin can parse date_add and date_sub, but it fails with a operation like (NOW() - INTERVAL 1 DAY) which works in MySQL.
Playground example: https://playground.wordpress.net/?php=8.1&networking=yes&plugin=no-unsafe-inline
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in wp-includes/sqlite/class-wp-sqlite-translator.php around the date_add and date_sub handling at lines 2265-2267. Reproduce the (NOW() - INTERVAL 1 DAY) case using the linked WordPress Playground example, then trace how the translator handles the MySQL date expression. Done means this operation works with SQLite-backed WordPress without breaking the existing date_add and date_sub cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php, sqlite
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100