TBH I am only dabbling in the jRuby space and am using h2 with
hibernate in a couple projects and am quite satisfied. IMO the biggest
gain with h2 is speed and transaction support. The mode support is
I think the way to do this in a jRuby project would be to use the h2
driver (org.h2.Driver) and in the connection URL specify the MySQL
Yes, modes are supported in both server and embedded mode.
There are some differences in the MySQL support over a std MySQL DB,
MySQL Compatibility Mode
To use the MySQL mode, use the database URL jdbc:h2:~/test;MODE=MySQL
or the SQL statement SET MODE MySQL .
* When inserting data, if a column is defined to be NOT NULL and
NULL is inserted, then a 0 (or empty string, or the current timestamp
for timestamp columns) value is used. Usually, this operation is not
allowed and an exception is thrown.
* When converting a floating point number to a integer, the
fractional digits should not be truncated, but the value should be
* The identifiers should be returned in lower case.
* Creating indexes in the CREATE TABLE statement should be
* For aliased columns, ResultSetMetaData.getColumnName() and
getTableName() return the real column and table name.
I think the above are workable issues and feel issues will be
relatively quickly resolved as Thomas (the developer) has a very
reasonable release schedule.
discussion group: http://groups.google.com/group/h2-database/