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

[Node.js] - Unclear what "inventory" is in Transactions example

    XMLWordPrintable

Details

    Description

      In the code sample below (N1QL transactions section) what is inventory ? Understood it's scope but was that an object or can I specify a string ? “Inventory” ?

      cluster.transactions().run(async (ctx) => {
        const st = 'SELECT * FROM hotel WHERE country = $1'
        const qr = await ctx.query(st, {
          scope: inventory,
          parameters: ['United Kingdom'],
        })
        for (let row in qr.rows) {
          // do something
        }
      })  

      Attachments

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

        Activity

          People

            maria.shodunke Maria Shodunke (Inactive)
            maria.shodunke Maria Shodunke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty