Re: Will Connection.createBlob be implemented any time soon?

Поиск
Список
Период
Сортировка
От Andreas Joseph Krogh
Тема Re: Will Connection.createBlob be implemented any time soon?
Дата
Msg-id OfficeNetEmail.22.1c42fcfd07350176.143d7e4c23c@prod2
обсуждение исходный текст
Ответ на Re: Will Connection.createBlob be implemented any time soon?  (Tom Dunstan <pgsql@tomd.cc>)
Ответы Re: Will Connection.createBlob be implemented any time soon?  (Florian Weimer <fweimer@redhat.com>)
Список pgsql-jdbc
På tirsdag 28. januar 2014 kl. 02:40:03, skrev Tom Dunstan <pgsql@tomd.cc>:
Hi Andreas

On 20 January 2014 00:11, Andreas Joseph Krogh <andreak@officenet.no> wrote:
> I'm using JPA and need to be able to set a (new) Blob as a field, like this:
>
>                 val b = con.createBlob()
>                 val os = b.setBinaryStream(1)
>                 IOUtils.copyLarge(is, os, new Array[Byte](1024 * 1024))
>                 myEntity.setData(b)
>
> Where MyEntity has a field "data" which is of type "Blob"

I was under the impression that most JPA implementations will allow
you to stick a byte[] as your property type and will handle the rest
under the good (usually using the blob support in PreparedStatement).
Is that an option for you, or do you need the streaming functionality?
 
I need streaming yes, that's why I use Blobs.
 
--
Andreas Joseph Krogh <andreak@officenet.no>      mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc
 

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Tom Dunstan
Дата:
Сообщение: Re: Will Connection.createBlob be implemented any time soon?
Следующее
От: Florian Weimer
Дата:
Сообщение: Re: Will Connection.createBlob be implemented any time soon?