[
https://issues.jboss.org/browse/TEIID-2152?page=com.atlassian.jira.plugin...
]
Steven Hawkins commented on TEIID-2152:
---------------------------------------
Not quite yet. That will of course be posted before this is resolved. The short form is
this merge is just a modified insert statement, just like h2. Also like h2 when a key
clause is not specified we assume that the primary key (or first unique key) of the table
is being used to ensure uniqueness. That support can be expanded, but the pk will likely
be the most common case.
The implementation simply performs an existence check for each row being merged and
perform an update if the row exists. That of course could be optimized a little more in
this simple case.
MERGE support
-------------
Key: TEIID-2152
URL:
https://issues.jboss.org/browse/TEIID-2152
Project: Teiid
Issue Type: Feature Request
Components: Query Engine
Reporter: Mark Addleman
Assignee: Steven Hawkins
Fix For: 8.3
Support for functionality similar to H2's MERGE command:
http://www.h2database.com/html/grammar.html?highlight=merge&search=me...
I don't know if there is a SQL standard for this and I don't care if the command
is identical to H2's. I'm mostly interested in a single command to support
somewhat atomic* "if pkey exists then update else insert" operation
* somewhat atomic = this doesn't have to be entirely atomic but, to the degree the
data source supports the equivalent of a MERGE or JTA
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira