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

SyncEngine treats JSONB as TEXT instead of BLOB

Aperta
#561 0 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
56/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
sqlite, swift

Direzione di ricerca

Start in SyncEngine.upsertFromServerRecord(_:force:db), where the issue reports the warning, and trace how JSONBRepresentation values are encoded when records are fetched from CloudKit. Check the JSONB column handling and relevant tests; done means the value is stored as a JSONB BLOB rather than TEXT and the reported SQLite error no longer occurs.

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

Descrizione

bug
Description

My CloudKit-synced schema has several JSONBRepresentation columns. When fetching the records from CloudKit, I get a purple warning saying:

Caught error: SQLite error 19: cannot store TEXT value in BLOB column notes.text - while executing `INSERT INTO "notes" ...

The warning is emitted from SyncEngine.upsertFromServerRecord(_:force:db).

Checklist
  • I wrote this in my own words, and aimed to be as succinct as possible, even if I used AI to help research its content.
  • I have determined whether this bug is also reproducible in a vanilla SwiftUI project.
  • I have determined whether this bug is also reproducible in a vanilla GRDB project.
  • If possible, I've reproduced the issue using the main branch of this package.
  • This issue hasn't been addressed in an existing GitHub issue or discussion.
Expected behavior

The JSONB column is encoded to CKAsset and parsed as JSONB BLOB.

Actual behavior

No response

Reproducing project

No response

SQLiteData version information

No response

Sharing version information

No response

GRDB version information

No response

Destination operating system

No response

Xcode version information

No response

Swift Compiler version information

Lingua principale
Swift
Stelle
1.9k
Fork
157
Merge medio
3m
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 pointfreeco/sqlite-data

Tutte le issue di pointfreeco/sqlite-data

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.