feature-request: support 64bit bigint
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- JavaScript
- Stars
- 13.7k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
not sure how feasible this feature-request is. sqlite3 docs say INTEGERS can be 1, 2, 3, 4, 6, or 8 bytes.
is it possible to:
- input - allow 64-bit bigint as a
paraminput? e.g.
db.exec({
params: {
"@bigint": 12345678901234567890n
},
sql: "SELECT @bigint"
});
- output - if integer >
Number.MAX_SAFE_INTEGER, then allow option to auto-coerce it to bigint? e.g.
db.exec({
preserveIntegerPrecision: true,
sql: "SELECT 1234 AS int, 1234567890123456789 AS bigint"
});
/*
{
"results": [
{
"columns": [
"int",
"bigint"
],
"values": [
[
1234,
12345678901234567890123456789n
]
]
}
]
}
*/
Contributor guide
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 with the db.exec parameter-binding path shown in the issue and the result conversion path for SQLite integers. Compare the requested bigint input and preserveIntegerPrecision output examples with SQLite's integer behavior; done means both cases have agreed semantics and coverage for safe and unsafe integer values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, sqlite
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100