Despite all the built-in flexibility of H2 to be compatible with other 
databases, there are instances where apps are designed - and one has no 
access to the source code - to work only with specific RDBMS, say Oracle or 
MSSQL. 
I still want to use h2 for development instances and not go through the 
hassle and cost of installing multiple databases. Setting the MODE 
parameter would not help when the DatabaseProductName is checked upon: it 
would return h2 regardless.

I was thus wondering

   1. could you make the DBName configurable (properties file or parameter 
   in the connection url ) ?
   
   2. If not, would a code change in the getDatabaseProductName of the h2 
   core library be a license breach or be considered a fork. Note I would not 
   redistribute the H2-mod as only for my own use
   
   3. beyond the db name, some SQL statements are hardcoded especially DDL 
   so they only work for the identified DBMS. 
   It would be great to have an option to catch known statements and 
   reformat them using regex using a list maintained in properties file e.g. 
   ALTER TABLE (\w*) MODIFY (\w*) TIMESTAMP DEFAULT SYSTIMESTAMP = ALTER 
   TABLE %1 ALTER %2 SET DEFAULT TIMESTAMP
   This would be evaluated in the executeQuery, executeUpdate and execute 
   methods and allow to transform any statement into H2 dialect without 
   touching the original application code

Does anyone have other ideas to fool an app ?

-- 
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.

Reply via email to