The documentation on blobs is frustratingly sparse!
I am trying to extract some columns from a table in in SQLite database and
insert in same table in another SQLite database.
I can't figure out how to copy of Blob attribute.
Note that the column does not have Blob affinity (it has text affinity).
But the data in the attributes are blobs.
I tried cast in the select:
Sequel.cast(:sketchGradingPng,:blob).as(:sketchGradingPng),
But doesn't solve the problem. Well, it might solve part of the problem:
Without the cast I get:
ArgumentError: invalid byte sequence in UTF-8
when reading the table. If I add the cast, that goes away.
(Note that :sketchGradingPng.cast(Blob) doesn't work. It says undefined
symbol Blob.)
The problem seems to be in the insert. I get:
SQLite3::SQLException: unrecognized token: "'�PNG
I tried .to_sequel_blob on the attribute, but it says to_sequel_blob is
undefined.
What do I have to do to copy a blob attribute from one table to another?
And is there any comprehensive documentation on using Blobs in Sequel?
There is precious little that I can find.
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.