WordPress / WordPress/sqlite-database-integration

Polyfill math functions for SQLite < 3.35.0

Open
#303 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 SQLite built-in math functions are available only from version 3.35.0.

They need to be enabled during compilation using the -DSQLITE_ENABLE_MATH_FUNCTIONS flag, but luckily, both Debian and Ubuntu distros are using the flag.

However, for older SQLite versions, we may need to polyfill these functions to support them. This is only relevant when WP_SQLITE_UNSAFE_ENABLE_UNSUPPORTED_VERSIONS is used, as otherwise, the mininum supported SQLite version is 3.37.0.

See: https://sqlite.org/lang_mathfunc.html

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 with SQLite's built-in math functions documentation and the conditions around WP_SQLITE_UNSAFE_ENABLE_UNSUPPORTED_VERSIONS. Determine which functions need compatibility support for SQLite versions below 3.35.0 and how the existing integration handles compilation flags. Done means older supported configurations provide equivalent math functions without changing behavior on newer SQLite versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, sqlite
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.