Questions tagged [couchbase-nodejs-sdk]

The Couchbase Node.JS SDK provides API to working with JSON documents using the Data, N1QL Query, Full Text Search, Analytics Query and Views Queries available from Couchbase Server.

This library builds on libcouchbase which integrates natively into Node’s libuv event loop.

Resources:

15 questions
9
votes
1 answer

Couchbase - retrieving multiple documents using key prefix

in Couchbase DB, is it possible to retrieve multiple documents using key prefix as query string, and it returns all the key-values which has key starting with supplied key prefix (like operator kind of thing)? without using Views or…
Anand
  • 4,523
  • 10
  • 47
  • 72
4
votes
0 answers

couchbase mock with nodejs sdk 3.0

Ths is a newbie question, there seems to be documentation in previous versions of the nodejs SDK on using couchbase.Mock does this exist in 3? How do I set it up? What I tried: I tried setting up like in the docs here but I get: make test make: ***…
Michael
  • 4,538
  • 5
  • 31
  • 58
3
votes
1 answer

How to set operationTimeout in Couchbase NodeJS SDK 3X?

I used CouchBase NodeJS SDK 2.6.10 previously and setting operationTimeout was something like this: const couchbase = require('couchbase') var cluster = new couchbase.Cluster('couchbase://XXXXXXXXXXXXXXXXXXX'); cluster.authenticate('USERNAME',…
Avishake
  • 460
  • 1
  • 6
  • 20
1
vote
0 answers

Why do I get `[Error: ambiguous_timeout]` when trying to batch multiple inserts?

I am using the Couchbase NodeJs SDK. I am trying to batch multiple inserts into Couchbase from an array by doing: import { connect } from "couchbase"; const cluster = await connect('...', { username: '...', password: '...', } …
1
vote
2 answers

Keep only n record when inserting new records in couchbase

I have a huge bucket that contains all user's notification data. like this: ┌────┬─────────┬─────────────────────────┐ │ id │ user_id │ data │ ├────┼─────────┼─────────────────────────┤ │ 1 │ 1 │ {"somekey":"someValue"} │ │…
1
vote
1 answer

Lambda NodeJS error: libcouchbase.so.2: cannot open shared object file: No such file or directory

I get the error libcouchbase.so.2: cannot open shared object file: No such file or directory in my lambda when it tries to initalize Running on Lambda using Couchbase and the Node SDK with external C bindings These are the steps I do to package…
1
vote
0 answers

How to handle errors thrown by couchbase SDK?

I have a NodeJS application which connects to couchbase and uses its sdk("couchbase": "^2.0.8") to connect and execute queries. In some cases the SDK code throws error like this: Bucket.prototype.getMulti = function(keys, callback) { if…
ThinkFloyd
  • 4,981
  • 6
  • 36
  • 56
0
votes
1 answer

Couchbase Server NodeJS SDK Cluster.openbucket Takes 58 Seconds to Open a Connection

I am using NodeJS SDK. In the basic sample that follows I am opening a bucket to insert a single record. I have put each method in a promise to force them run one after another (sequentially) so I can measure each method’s running time. My OS:…
Kamran
  • 782
  • 10
  • 35
0
votes
1 answer

Couchbase Node SDK Error: JSON unmarshalling error: No operator for name DistinctScan

I am using Couchbase server(4.5 Enterprise) Node SDK(v2.3.0) to execute some N1ql. When I open couchbase web workbench to execut the following N1ql, all works fine. SELECT meta().id, * FROM `Sample-Bucket` where owner != 'userid' AND recycled IS…
leonsPAPA
  • 657
  • 2
  • 13
  • 29
0
votes
1 answer

Can I add new object to the array in couchbase docusing n1ql or node sdk

I have following doc: { "userId":"b447drga851g", "media": [ { "mediaId": "stf9-oi6f-kkvt7s-plt6c-iud5", "mediaType": "IMAGE", "fileName": "sssss.jpeg", "device": "LENOVO A6000", …
0
votes
1 answer

Nodejs Couchbase deserialize date property from document

I'm saving in Couchbase a document which has javascript Date values, and wish to get it exactly the same, not as string '2016-01-02T12:13:14Z'. Found a way to achieve this using plain Javascript, by using the second parameter of JSON.parse , but…
0
votes
1 answer

Bulk insert or update with Couchbase Ottoman

Is it possible to do bulk inserts and/or update with Couchbase Ottoman? I am trying to build a script that imports my data from a MySQL database, and I would rather not import each model one at a time.
Julio Garcia
  • 1,904
  • 16
  • 26
0
votes
2 answers

node.js 404 file not found error

var http = require('http'), fs=require('fs'), path=require('path'), host ='127.0.0.1', port='9001'; var mimes = { ".htm":"text/html", ".css":"text/css", ".js":"text/javascript", ".gif":"text/gif", ".jpg":"text/jpeg", …
0
votes
2 answers

Delete multiple couchbase entities having common key pattern

I have a use case where I have to remove a subset of entities stored in couchbase, e.g. removing all entities with keys starting with "pii_". I am using NodeJS SDK but there is only one remove method which takes one key at a time:…
ThinkFloyd
  • 4,981
  • 6
  • 36
  • 56
0
votes
1 answer

Which couchbase node will serve request?

I am having NodeJS service which talks to couchbase cluster to fetch the data. The couchbase cluster has 4 nodes(running on ip1, ip2, ip3, ip4) and service also is running on same 4 servers. On all the NodeJS services my connection string looks like…
ThinkFloyd
  • 4,981
  • 6
  • 36
  • 56