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