Subject Re: [Firebird-Java] Jaybird 2.1.3 released
Author Fidel Viegas
On Tue, Feb 26, 2008 at 10:36 PM, Roman Rokytskyy <rrokytskyy@...> wrote:

> The arrays have some history behind - it was done for request of one big
> company that needed to store data from different sensors in their
> experiments somewhere in 80s. The arrays themselves are simple BLOBs
> with some internal structure. Support for arrays in Firebird is quite
> rudimentary - you can access the item in arrays via its index and that's
> it. The API calls are even worser - each access to an item might require
> additional roundtrip to the server.

Yes, Helen told me about that in another thread. I thought that
besides declaring them, you could also process them. I was actually
trying to declare a local variable in a stored procedure. But, was not
aware that the only place where you can declare an array is the table.

> In Jaybird support for arrays require some research - the wire protocol
> for the calls to access array elements is not implemented in Java (the
> JNI-based stuff can be implemented more easily). However considering the
> low popularity of arrays in FB, support for them in Jaybird is also low
> prio for me. However, let's keep the request there, maybe there will be
> some volunteer to add this code.

Yes, it would be good for some people. I think that with the
introduction of temporary global tables in FB 2.1, we can use that
instead. I had some time to figure out where I would use GTTs, but
Dimitry cleared that out for me.

Just one question. If the Array data type is nothing but a BLOB, then
couldn't we implement the ArrayType based on the BlobType? I mean, if
they are stored in a Blob with a structure, the implementation would
require read the data from the blob into this structure and manipulate
it in the client side, right?