You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
I think this is because SQLite3.prototype.fromColumnValue does not do anything beyond a JSON-decode for buffer -- it was never updated for LB4. I believe a change like the following will work:
Storing Buffer as a JSON array in text is also one of the worst ways to do it. This stuff really should've been an sqlite BLOB. Maybe use better-sqlite3 which does that and is faster?
Bug or 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
The text was updated successfully, but these errors were encountered: