Lighter icon indicating copy to clipboard operation
Lighter copied to clipboard

UUIDs serialized as text are bound as blob

Open micampe opened this issue 9 months ago • 8 comments

I have a table with UUID columns. If I set uuidSerialization = text the comparison between the column and a UUID fails because the argument is being bound as blob because UUID.sqlUUIDStorageStyle is .blob.

This returns no results, and I confirmed there are records with that id in a sqlite repl.

try db.data.fetch { s in
  s.parentId == parent.id
}

Setting UUID.sqlUUIDStorageStyle = .string in my code fixes this.

I am investigating and it doesn't seem the serialization option is ever used to set the storage style. This seems to also be an issue for dates but I haven't verified.

I am using version 1.2.4.

micampe avatar May 10 '24 08:05 micampe