Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-4461

Document ANSI MERGE support

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Major
    • Mad Hatter
    • Mad Hatter
    • query
    • DOC-2019-S05-Mar08
    • 1

    Description

      Currently, the MERGE statement uses ON KEY clause:

      MERGE INTO target USING source ON KEY <key_expr>
          WHEN MATCHED THEN <merge_update> or <merge_delete>
          WHEN NOT MATCHED THEN <merge_insert>
      

      The <key_expr> is an expression that maps to a document key of the target keyspace.

      This form of MERGE statement will continue to be supported. In addition, the following syntax will also be supported:

      MERGE INTO target USING source ON <join_expr>
          WHEN MATCHED THEN <merge_update> or <merge_delete>
          WHEN NOT MATCHED THEN <merge_insert>
      

      The only major difference is replacement of the ON KEY clause with the ON clause. The join expression is similar to the join condition specification in ANSI JOIN, which can contain any arbitrary expression.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              simon.dew Simon Dew
              simon.dew Simon Dew
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty