Jeremy Evans wrote:
> It's known to be unsupported in the specs:
>
> Supported types should support generic file type (Not yet working on
> h2)
> spec/integration/spec_helper.rb:54:in `cspecify'
>
> You may be able to retrieve them from the database, but inserting is a
> problem.  If you know what the correct SQL to use, we could probably
> update the h2 jdbc subadapter to fix it.
>
>   
Hi Jeremy,
Further to our chat on irc, I have been able to get this to work:-

ds = DB[:scripts][:id=>3]
puts String.from_java_bytes(ds[:content].getBytes(0,ds[:content].length))

this seems to work with  :convert_types  either  unset  or false
h2 returns the blob (File type) as java::OrgH2Jdbc::jdbcBlob which is 
mapped to java.sql.Blob

Regards
Paul F Fraser
 

--

You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.


Reply via email to