LOB support

13 views
Skip to first unread message

Rami Ojares

unread,
May 18, 2010, 9:18:21 AM5/18/10
to h2-da...@googlegroups.com
Hi,

Are there any plans to implement support for Clob and Blob objects that
are part of the jdbc api?
Everything can already be done with get/setXXXStream methods but I think
supporting these 2 objects would make h2 more compatible when porting
applications to it.

- rami

--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To post to this group, send email to h2-da...@googlegroups.com.
To unsubscribe from this group, send email to h2-database...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.

Thomas Mueller

unread,
May 20, 2010, 4:05:52 PM5/20/10
to h2-da...@googlegroups.com
Hi

> Are there any plans to implement support for Clob and Blob objects that are
> part of the jdbc api?

Those interfaces are already supported. Not all methods, but reading
should work. If you need a method that is not yet supported, please
tell me which one(s) and why you need it. Some methods are partially
implemented, but there are not tests yet.

Regards,
Thomas

Rami Ojares

unread,
May 20, 2010, 4:35:46 PM5/20/10
to h2-da...@googlegroups.com
I have code like this

Blob blob = conn.createBlob();
BufferedImage img = ImageIO.read(stream);
...
ImageIO.write(img, "png", blob.setBinaryStream(1));
pstmt.setBlob(1, blob);

I think that complained something about Blobs not being supported.
This could be overcome currently by using piped streams and starting a
new thread to do the writing to the output stream.

- rami

Thomas Mueller

unread,
May 24, 2010, 4:07:34 AM5/24/10
to h2-da...@googlegroups.com
Hi,

> I think that complained something about Blobs not being supported.

Yes, that's true, this is not supported yet. Thanks a lot for
reporting! I will add a feature request for this. Unfortunately I
can't tell you when it will be implemented. I'm afraid it's unlikely
that it will be implemented this year. Patches are welcome of course!
Reply all
Reply to author
Forward
0 new messages