db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob Barrett" <Jaco...@Attachmate.com>
Subject RE: User Defined Types
Date Tue, 07 Sep 2004 22:10:35 GMT
> From: Jeffrey Lichtman [mailto:swazoo@rcn.com] 
> 
> >Well as I thought, it wasn't that hard to add it back in. . .
> >I just added a data type "JAVA" to the parser. . .
> 
> I'm curious about this datatype. Is it a new keyword to 
> indicate to the parser that a class name follows? What is the syntax?

I could do that, I just haven't done it yet.  This is more a proof of
concept to make sure everything else still worked in Derby when the
table contained Java objects.  The next step is to make it cleaner.
Currently the syntax is:
CREATE TABLE mytab (col JAVA);
There is no type support yet, but it should be easy to take the next
token as the type.

> Originally in Cloudscape, one only had to use the class name 
> when creating a column of that class. For example:
> 
>      CREATE TABLE mytab (col java.lang.Integer);

I could do it this way to so that no one has to change their syntax.
This is a little more complex than the proof of concept that I did.  If
I take what should be the datatype token and do a class.forName() on it
after all the other type checks have failed this should work.

> Do you also plan to re-activate class aliases (assuming 
> they've also been disabled)?

Not familiar with class aliases in Cloudscape.  I will have to look into
that.  I think they are disable, at least I didn't see anything that
would support that in the parser.

I would like to figure out the any "standard" way of defining and using
user defined types in SQL99 and implement it that way.  Time constraints
on my project my require that I just deliver it this way though.

Mime
View raw message