WordPress / WordPress/sqlite-database-integration

Date operations not supported

Open
#90 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.