Skip to content

SyncEngine treats JSONB as TEXT instead of BLOB #561

Open

Description

@lucamegh

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions