Skip to content

Conversation

@liuzhch1
Copy link
Contributor

fix #105

WIP
Currently only implemented the sqlite part. I'd add mysql and postgres parts once we decided to use this approach(just copy paste I think).

@liuzhch1 liuzhch1 requested a review from a team as a code owner November 26, 2025 13:06
@liuzhch1
Copy link
Contributor Author

We don't have to convert it to uint8array - since number[] is the most native type for this we might as well return that as-is and let the user decide whether they want uint8array - we do the same in tauri's invoke for example. (from #105)

I think we should convert it to uint8array. Consider if we change to other effective way to transmit data as binary(eg msg pack) in future, the BLOB data directly come to JS as uint8array. To keep api the same(return number[]), we need to convert Array.from(uint8array) then give it to user. However user might do need uint8array format since it is a blob, so they need to convert it back Uint8Array(number[]). Those converts do take time and memory

... just some thoughts comes to my mind, maybe it's overkill for now. api breaking change might be accepted in future version or additional api can be added.. and user can invoke invoke<T>('plugin:sql|select' themself, right? haha

@FabianLars
Copy link
Member

Those converts do take time and memory

which was my argument to not do these conversations on our side but i don't care too much since number[] -> uint8array should be relatively cheap.

@FabianLars
Copy link
Member

p.s. i'm a bit busy today so will take a look tomorrow, sry

@github-actions
Copy link
Contributor

Package Changes Through 34d7de3

There are 17 changes which include dialog-js with minor, dialog with minor, log with minor, log-js with minor, localhost with patch, barcode-scanner with patch, barcode-scanner-js with patch, http with patch, http-js with patch, nfc with patch, nfc-js with patch, updater with minor, updater-js with minor, upload with minor, upload-js with minor, websocket with patch, websocket-js with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
api-example 2.0.38 2.0.39
api-example-js 2.0.34 2.0.35
barcode-scanner 2.4.2 2.4.3
barcode-scanner-js 2.4.2 2.4.3
dialog 2.4.2 2.5.0
dialog-js 2.4.2 2.5.0
http 2.5.4 2.5.5
http-js 2.5.4 2.5.5
localhost 2.3.1 2.3.2
log 2.7.1 2.8.0
log-js 2.7.1 2.8.0
nfc 2.3.3 2.3.4
nfc-js 2.3.3 2.3.4
updater 2.9.0 2.10.0
updater-js 2.9.0 2.10.0
upload 2.3.2 2.4.0
upload-js 2.3.2 2.4.0
websocket 2.4.1 2.4.2
websocket-js 2.4.1 2.4.2

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@liuzhch1
Copy link
Contributor Author

yeah sure, no worries

let's use number[] for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[sql] Can't save binary data with execute (SQLite)

2 participants