Enum support : HSQLDB : used in in memory datastore

1,502 views
Skip to first unread message

Paritosh Ranjan

unread,
Nov 22, 2010, 1:15:58 AM11/22/10
to DataCleaner-dev
Hi,

I was using the datastore to insert some values (which included few
enums) .

However, hsqldb is used as in-memory database here which does not
supports enums.

I don't have a solution for this yet, but we can look for a in-memory
database which supports enums and replace hsqldb with that.

Thanks and Regards,
Paritosh

Kasper Sørensen

unread,
Nov 22, 2010, 1:50:36 AM11/22/10
to DataCleaner-dev
Hi Paritosh,

I imagine that you can just save it as a String column and use the
name() method on the enum. Relational databases don't typically have a
concept similar to java's enums so you should probably go for
something that will just be able to store the information. Besides -
input columns in AnalyzerBeans only support String, Number, Boolean
and Date, so it has to be something convertible to one of these types,
and I think String comes closest (alternatively Number - using the
ordinal() of the enum, but I prefer String as ordinals may change if
you edit the enum).

Regards,
Kasper
Reply all
Reply to author
Forward
0 new messages