Buffer property return TEXT instead of buffer

Open
#43 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript, sqlite
Domain
database

Research direction

The issue names loopback-connector-sqlite3 and SQLite3 but mentions no files, tests, or reproduction repository. Start by locating the connector's type conversion and retrieval paths, then reproduce the Buffer property behavior; done should mean stored Buffer values are retrieved as Buffer objects rather than JSON-shaped TEXT values.

Written by the indexing model from the issue text.

Description

Bug or feature request
  • Bug
  • Feature request
Description of feature (or steps to reproduce if bug)

Currently, I am using this with loopback4. But the connector does not provide some type support such as, Buffer or Array. They will all turn into TXET in sqlite3. And more importantly, the 'Buffer' seems to work quite well. When i wrote something to a 'Buffer' property, it will ture in to some TEXT like

{ type: 'Buffer',
  data: 
   [ 120,
     156,
     237,
     205,
     59,
]
```.
And I when i retrieve it is still a JSON object instead of a Buffer object which is different than the TypeScript definition in my model property. While Typescript believe it is a buffer,,,,


### Link to sample repo to reproduce issue (if bug)



### Expected result



### Actual result (if bug)



### Additional information (Node.js version, LoopBack version, etc)


Dominant language
JavaScript
Stars
13
Forks
21
PR merge metrics
No merged PRs in 30d

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.

More from loopbackio/loopback-connector-sqlite3

All issues in loopbackio/loopback-connector-sqlite3

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.