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

Document the right use of named parameter substitution in N1QL

    XMLWordPrintable

Details

    • 1

    Description

      Please document the right usage for named parameter substitution for N1QL queries. The following query throws a syntax error regarding the use of named parameter substitution -

      UPDATE myBucket USE KEYS["myDocId"] SET $myCounter = $myCounter + 1; 

      error is as follows -

      [
        {
          "code": 3000,
          "msg": "syntax error - at $myCounter",
          "query_from_user": "UPDATE destination USE KEYS[\"myDocId\"] SET $myCounter = $myCounter + 1;"
        }
      ] 

      I recollect that there was page in documentation describing the clauses (such as WHERE, FROM etc.) only after which the named parameter substitution was permissible. But I'm unable to find it now.

      Attachments

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

        Activity

          People

            simon.dew Simon Dew
            Gautham.Banasandra Gautham Banasandra (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty