I'm working in development mode with an H2 in memory database, but I'd like it to behave as much as possible like a mysql database (see http://www.h2database.com/html/features.html#compatibility)
this is my configuration in application.conf file:
db.default.driver=org.h2.Driver
db.default.url="jdbc:h2:mem:play;MODE=MYSQL;DB_CLOSE_DELAY=-1"
to test it I just run "play" and from play's console I issue "h2-browser" and in the url jdbc field I enter "jdbc:h2:mem:play;MODE=MYSQL;DB_CLOSE_DELAY=-1"
the following statements work ok in mysql:
CREATE TABLE `tmp` (
`name` varchar(50) NOT NULL
);
insert into tmp (name) values ('slash: \\, simple quotes \', double quotes \" -');
select * from tmp;
but in the h2 console I get an error, and the only character I can escape is the single quotes, just by preceding it with another single quote. (Also tried entering 'SET MODE MySQL;')
Is there some way to have h2 behave like mysql from play's framework h2-browser? or is it just a limitation of h2?