knex-libsql inserting wrong binary values on remote connection
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, sqlite
Research direction
Start by running the provided reproduction against a remote database and compare its binary result with the memory and file database cases. Trace the remote connection's handling of the Buffer value and verify that selecting the inserted four-byte value returns the original binary data rather than a corrupted string.
Written by the indexing model from the issue text.
Description
I tried to insert some binary data with Buffer objects, and when I fetched the data, it gave me the wrong result like:
[ { id: 'ޭ��' } ]
To replicate:
await knex.schema.createTable("binary_data", (table) => {
table.binary("id", 4)
})
await knex.table('binary_data').insert({ id: Buffer.from([0xde, 0xad, 0xbe, 0xef]) })
console.log(await this.knex.select().from('binary_data')) // output: [{ id: 'ޭ��' }]
I can replicate this when I connect to a remote database. Memory or file database works fine.
- Dominant language
- JavaScript
- Stars
- 11
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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.
More from libsql/knex-libsql
-
Difficulty 1/5 Under an hour Newbie friendliness 45/100
libsql/knex-libsql#5 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
libsql/knex-libsql#3 · 6 comments · 2 reactions ·
-
enhancement question
Difficulty 5/5 Over a week Newbie friendliness 25/100
libsql/knex-libsql#2 · 1 reaction ·
All issues in libsql/knex-libsql
Similar issues
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AllTheMods/ATM-10-L#19 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
SignalK/n2k-signalk#345 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
JuliaPluto/PlutoPlotly.jl#72 ·