db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Weber <karl.webe...@googlemail.com>
Subject UDT and java arrays
Date Tue, 08 Nov 2011 21:43:50 GMT
Hi,

Derby does support UDTs. One can use any java.io.Serializable java class as a 
UDT.

On the other hand, derby does not support SQL ARRAY types.

However, every java array is an object that implements java.io.Serializable, 
so can one define a UTD of the form

CREATE TYPE APP.DARRAY
	EXTERNAL NAME 'double[]'
	LANGUAGE JAVA;
?
ij does not complain. It also allows to use it in a table definition, e.g.

ij> CREATE TYPE APP.DARRAY
> EXTERNAL NAME 'double[]'
> LANGUAGE JAVA;
0 Zeilen eingefügt/aktualisiert/gelöscht
ij> create table XXX (
> ASDF APP.DARRAY
> );
0 Zeilen eingefügt/aktualisiert/gelöscht

However, how do I insert values into this table, using normal SQL and using 
the JDBC API?

Or is this all nonsense, although I do not get any error message so far?

/Karl


Mime
View raw message