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

Node.js SDK 2.x: Explain how to use rawParam to add request level parameters to a N1QL query

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Won't Fix
    • Major
    • None
    • None
    • sdk

    Description

      It is possible through the "rawParam" method to pass in request level parameters when doing N1QL queries https://docs.couchbase.com/server/current/settings/query-settings.html#section_nnj_sjk_k1b

      We should explain how to use it, for example for things like clientContextId:

      var q = N1qlQuery.fromString('query string here');
      q.rawParam('client_context_id', 'Some value');
      var req = bucket.query(q);
      

      This feature seems to have been added in the 2.6.0 version, so it should only apply to 2.6 and higher.

      Attachments

        Issue Links

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

          Activity

            People

              richard.smedley Richard Smedley
              david.saadeh David Saadeh (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty