Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

bug: executeSet does not support blobs

Aperta
#642 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
java, javascript, sqlite
Ambito
database, mobile

Direzione di ricerca

Inizia in UtilsSQLite.java confrontando il percorso dei parametri di executeSet con la chiamata di run a objectJSArrayToArrayList, che riconosce gli oggetti Buffer. Riproduci l'esempio INSERT con valori Buffer su Android, quindi verifica che executeSet accetti i blob come fa run.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug/fix

Plugin version:
"@capacitor-community/sqlite": "^7.0.0"

Platform(s):
Just tested on Android, don't know about iOS and Electron.

Current behavior:
Let's assume the following code:

const statement = `INSERT INTO ${tableName} (id, blob) VALUES (?, ?);`;
const values = [[1, myBlob1], [2, myBlob2]]
const result = await this.db.executeSet([{statement, values}], true);

This results in a parsing error ("unexpected character '{').

My blobs are of type Buffer. Those work fine with the run command, but if I want to mass insert data with executeSet, they don't work.

Expected behavior:
Blobs can be used in executeSet as well.

Steps to reproduce:
See above

Related code:
I debugged the plugin, and I found out that in the code of the "run" statement the method "objectJSArrayToArrayList" from the file "UtilsSQLite.java" is called. This method is recognizing objects of type "Buffer" and is parsing the data from it.
This method is not called during "executeSet".

Other information:
Are blobs of type Buffer intentionally not supported or did so far just nobody need this yet? Or should I use executeSet somehow differently to make it work?

Capacitor doctor:

   Capacitor Doctor   

Latest Dependencies:

  @capacitor/cli: 7.2.0
  @capacitor/core: 7.2.0
  @capacitor/android: 7.2.0
  @capacitor/ios: 7.2.0

Installed Dependencies:

  @capacitor/cli: 7.0.1
  @capacitor/android: 7.0.1
  @capacitor/ios: 7.0.1
  @capacitor/core: 7.0.1

[success] Android looking great! 👌
[error] Xcode is not installed
Lingua principale
Swift
Stelle
661
Fork
158
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di capacitor-community/sqlite

Tutte le issue di capacitor-community/sqlite

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.