Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

bug: executeSet does not support blobs

Đang mở
#642 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
java, javascript, sqlite
Lĩnh vực
database, mobile

Hướng nghiên cứu

Bắt đầu trong UtilsSQLite.java bằng cách so sánh đường dẫn tham số của executeSet với lệnh gọi objectJSArrayToArrayList của run, vốn nhận diện các đối tượng Buffer. Tái hiện ví dụ INSERT với các giá trị Buffer trên Android, sau đó xác minh rằng executeSet chấp nhận các blob giống như run.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Swift
Star
661
Fork
158
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của capacitor-community/sqlite

Tất cả issue của capacitor-community/sqlite

Issue tương tự

Thêm issue về Swift

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.