nodejs / nodejs/node

Enable the 2 new SQLite 3.51.0 amalgamation extensions.

Open
#60,618 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature request sqlite
Dominant language
JavaScript
Stars
122k
Forks
37.3k
Avg merge
4d 2h
Merged PRs (30d)
283

Description

Depends on #60614.

What is the problem this feature will solve?

SQLite 3.51.0 added 2 new extensions to the amalgamation:

  • Carray: Enabled by compile-time flag -DSQLITE_ENABLE_CARRAY. Useful for binding C-language arrays to SQL queries. I am unsure wether JS/TS can make use of this directly, but perhaps it may at least be useful for internal use in the Node.js-SQLite bindings. I am, however, not familiar enough with the code to comment on it.

  • Percentile: Enabled by compile-time flag -DSQLITE_ENABLE_PERCENTILE. Useful for extracting various statistical percentages from tables and should be faster than JS by having a native implementation. It also includes another compile time flag, -DSQLITE_ENABLE_ORDERED_SET_AGGREGATES=1, which can be set to 1 to support cross-platform SQL syntax, adding the new WITHIN keyword. Also increases binary size by about 1200 bytes. See the docs for all details: https://sqlite.org/compile.html#enable_ordered_set_aggregates.

What is the feature you are proposing to solve the problem?

Enable the Percentile extension with its compile flags.

Carray usefulness should be investigated and can also be enabled via its compile-time flag.

What alternatives have you considered?

Missing out on these new extensions.

Contributor guide

Open the contributing guide

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 by reviewing dependency #60614 and the Node.js SQLite amalgamation integration. Check how compile-time flags are supplied, then assess enabling SQLITE_ENABLE_PERCENTILE, SQLITE_ENABLE_ORDERED_SET_AGGREGATES, and SQLITE_ENABLE_CARRAY; done means the intended extensions are enabled and their support is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, node.js, sqlite
Domain
backend, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
43/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.