We are porting PHP app to java and first idea was to use some in
memory java database to handle SQL queries.
But finally we came to decision to completely rewrite app from
scratch.

If some java emebed DB will emulate MySQL then it would offer a easy
way to port PHP/MySQL apps to java.

If I will modify H2 next time I will post patch back to community.
I am sorry I have not done it that time.

Thanks, Max


On Dec 23 2008, 2:26 pm, "Thomas Mueller"
<[email protected]> wrote:
> Hi,
>
> > I wish H2 to support "REPLACE" query instead of MERGE
> > INSERT INTO table SET column1 = value1, column2 = value2
>
> I will add a feature request. However if it's urgent I suggest to
> implement it yourself and send a patch. I think it's quite simple to
> implement it, but for me it is low priority (sorry).
>
> > Could you advise where should I look in source code If it is required
> > to modify source code ?
>
> See 'Parser.java'. I think that's the only class that needs to be
> modified. The REPLACE syntax is very similar to the MERGE syntax.
> INSERT is very similar to the current INSERT.
>
> > I wish H2 to to be more tolerant to syntax.
> > H2 fires errors when I assign NULL to NOT NULL
> > It should make strings blank and numbers 0
>
> That should already work. Did you try with the MySQL mode?
>
> jdbc:h2:~/test;MODE=MYSQL
>
> DROP TABLE IF EXISTS TEST;
> CREATE TABLE TEST(ID INT PRIMARY KEY, NAME VARCHAR(255) not null);
> INSERT INTO TEST VALUES(1, null);
>
> If it doesn't work for your case please tell me.
>
> Regards,
> Thomas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to