This is the easier approach
http://h2database.com/html/grammar.html#create_domain
CustomDataTypeHandler is more sophisticated. Have a look at the unit test
for it, to see how it works.
On 25 October 2017 at 14:09, Thomas Binu <[email protected]> wrote:
> I am new to the h2 database. I am trying to add a new datatype to the h2
> database. For example, a password datatype that the user can use like this.
>
> CREATE TABLE password_test(id INT, name VARCHAR, password PASSWORD);
> INSERT INTO password_test VALUES(1, ‘myName’,’myPass’);
>
> From the documentation, I saw that there is a CustomDataTypeHandler class
> but I am not sure how to make use of it. Can someone give an example of how
> to add a new datatype to the h2 database or nudge me in the right
> direction? Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.