## org.eclipse.datatools.modelbase.sql.query
Interface QueryMergeStatement

All Superinterfaces:
  org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.ENamedElement, org.eclipse.emf.ecore.EObject, org.eclipse.emf.common.notify.Notifier, QueryChangeStatement, QueryStatement, SQLDataChangeStatement, SQLDataStatement, SQLObject, SQLQueryObject, SQLStatement

    public interface QueryMergeStatement

extends QueryChangeStatement

A representation of the model object 'SQL Merge Statement'. SQL syntax: MERGE INTO <target table> [ [ AS] <merge correlation name> ] USING

ON <merge operation specificaion list> where: <merge operation specification list> ::= <merge operation specification> [<merge operation specification ...] <merge operation specification> ::= <merge update specification> | <merge insert specification> Note: a non-syntactic rule is that the operation specification list can contain at most one update specification and one insert specification. Example: MERGE INTO inventory AS in USING (SELECT partno, description, count FROM shipment WHERE shipment.partno IS NOT NULL) AS sh ON (in.partno = sh.partno) WHEN MATCHED THEN UPDATE SET description = sh.description, quantity = in.quantity + sh.count WHEN NOT MATCHED THEN INSERT (partno, description, quantity) VALUES (sh.partno, sh.description, sh.count)

The following features are supported:

- `Target Table`
- `Source Table`
- `On Condition`
- `Operation Spec List`

See Also:
  `SQLQueryModelPackage.getQueryMergeStatement()`

Method Summary
`MergeOnCondition` `getOnCondition()` Returns the value of the 'On Condition' containment reference.
`org.eclipse.emf.common.util.EList` `getOperationSpecList()` Returns the value of the 'Operation Spec List' containment reference list.
`MergeSourceTable` `getSourceTable()` Returns the value of the 'Source Table' containment reference.
`MergeTargetTable` `getTargetTable()` Returns the value of the 'Target Table' containment reference.
`void` `setOnCondition(MergeOnCondition value)` Sets the value of the '`On Condition`' containment reference.
`void` `setSourceTable(MergeSourceTable value)` Sets the value of the '`Source Table`' containment reference.
`void` `setTargetTable(MergeTargetTable value)` Sets the value of the '`Target Table`' containment reference.

Methods inherited from interface org.eclipse.datatools.modelbase.sql.query.SQLQueryObject
`getSourceInfo, getSQL, setSourceInfo, setSQL`

Methods inherited from interface org.eclipse.datatools.modelbase.sql.schema.SQLObject
`addEAnnotation, addEAnnotationDetail, getComments, getDependencies, getDescription, getEAnnotation, getEAnnotationDetail, getExtensions, getLabel, getPrivileges, removeEAnnotationDetail, setAnnotationDetail, setDescription, setLabel`

Methods inherited from interface org.eclipse.emf.ecore.ENamedElement
`getName, setName`

Methods inherited from interface org.eclipse.emf.ecore.EModelElement
`getEAnnotations`

Methods inherited from interface org.eclipse.emf.ecore.EObject
`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset`

Methods inherited from interface org.eclipse.emf.common.notify.Notifier
`eAdapters, eDeliver, eNotify, eSetDeliver`

Methods inherited from interface org.eclipse.datatools.modelbase.sql.statements.SQLStatement
`getSQL, setSQL`

Methods inherited from interface org.eclipse.datatools.modelbase.sql.statements.SQLStatement
`getSQL, setSQL`

Method Detail

### getTargetTable

    MergeTargetTable getTargetTable()

  Returns the value of the 'Target Table' containment reference. It is bidirectional and its opposite is '`Merge Statement`'.

  If the meaning of the 'Target Table' containment reference isn't clear, there really should be more of a description here...

  Returns:
    the value of the 'Target Table' containment reference.
  See Also:
    `setTargetTable(MergeTargetTable)`, `SQLQueryModelPackage.getQueryMergeStatement_TargetTable()`, `MergeTargetTable.getMergeStatement()`

### setTargetTable

    void setTargetTable(MergeTargetTable value)

  Sets the value of the '`Target Table`' containment reference.

  Parameters:
    `value` - the new value of the 'Target Table' containment reference.
  See Also:
    `getTargetTable()`

### getSourceTable

    MergeSourceTable getSourceTable()

  Returns the value of the 'Source Table' containment reference. It is bidirectional and its opposite is '`Merge Statement`'.

  If the meaning of the 'Source Table' containment reference isn't clear, there really should be more of a description here...

  Returns:
    the value of the 'Source Table' containment reference.
  See Also:
    `setSourceTable(MergeSourceTable)`, `SQLQueryModelPackage.getQueryMergeStatement_SourceTable()`, `MergeSourceTable.getMergeStatement()`

### setSourceTable

    void setSourceTable(MergeSourceTable value)

  Sets the value of the '`Source Table`' containment reference.

  Parameters:
    `value` - the new value of the 'Source Table' containment reference.
  See Also:
    `getSourceTable()`

### getOnCondition

    MergeOnCondition getOnCondition()

  Returns the value of the 'On Condition' containment reference. It is bidirectional and its opposite is '`Merge Statement`'.

  If the meaning of the 'On Condition' containment reference isn't clear, there really should be more of a description here...

  Returns:
    the value of the 'On Condition' containment reference.
  See Also:
    `setOnCondition(MergeOnCondition)`, `SQLQueryModelPackage.getQueryMergeStatement_OnCondition()`, `MergeOnCondition.getMergeStatement()`

### setOnCondition

    void setOnCondition(MergeOnCondition value)

  Sets the value of the '`On Condition`' containment reference.

  Parameters:
    `value` - the new value of the 'On Condition' containment reference.
  See Also:
    `getOnCondition()`

### getOperationSpecList

    org.eclipse.emf.common.util.EList getOperationSpecList()

  Returns the value of the 'Operation Spec List' containment reference list. The list contents are of type `MergeOperationSpecification`. It is bidirectional and its opposite is '`Merge Statement`'.

  If the meaning of the 'Operation Spec List' containment reference list isn't clear, there really should be more of a description here...

  Returns:
    the value of the 'Operation Spec List' containment reference list.
  See Also:
    `SQLQueryModelPackage.getQueryMergeStatement_OperationSpecList()`, `MergeOperationSpecification.getMergeStatement()`