nodejs / nodejs/node

sqlite: support custom collations via sqlite3_create_collation_v2

Open
#63,316 4 comments 0 reactions 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

What is the problem this feature will solve?

This affects the ORDER BY clause. Without this feature the word Ágætis gets put after the word Zebra. I'm building a music DB and this issue comes up a lot.

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

Expose sqlite's sqlite3_create_collation_v2 API in NodeJs.

What alternatives have you considered?

This sorting can be done in code, but it is much slower than having the feature available

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 with SQLite's sqlite3_create_collation_v2 API and Node.js's existing SQLite API entry point, then trace how database features are exposed. Done means custom collations can be registered in Node.js and used to produce the intended ORDER BY result for names such as Ágætis and Zebra.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, sqlite
Domain
backend-api-design, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.