Problem with N1QL DP4


Hi Couchbase,

Yesterday I got n1ql running with dp3 in node. Today I realized dp4 is out and tried to migrate to the new dp4.

Problem is I tried to query like this:

var n1ql = require(‘couchbase’).N1qlQuery;
var bucket = cluster.cluster.openBucket(‘news’);
var query = n1ql.fromString(“SELECT * FROM news”);
console.log("error: " + err);
console.log("result: " + res);

The query result i get is “result: null”.
Doing the same in the cbq from dp4 on windows gves me:

“requestID”: “205e2a27-05be-4837-ac8f-6e238e3bcfa8”,
“signature”: {
"": ""
“results”: [
“news”: {
“authorId”: 7,
“createdAt”: “2014-12-16T12:42:07:701Z”,
“summary”: “Short summary”,
“test”: “test2”,
“title”: “Test Title”,
“updatedAt”: “2014-12-19T14:37:23.692Z”
“status”: “success”,
“metrics”: {
“elapsedTime”: “9.996207ms”,
“executionTime”: “9.746981ms”,
“resultCount”: 1,
“resultSize”: 307

so basically what I need. In dp3 everything works fine in node.

I am currently using couchbase client 2.0.4.




N1QL dp4 changed the response format compared to DP3. We are currently reworking the client SDK support for the new format and will publish new releases once it is done. For now please play around with DP4 using the cbq command or stick to DP3 if you want to use it from the SDK.

@brett19 might be able to provide a closer timeframe when DP4 support is coming to node.


@daschl thank you for the fast answer.

Looking forward to the updated SDK, I will stick to DP3 for now.


Hey Balgorn,

N1QL DP4 support is available through the latest commit to the Node.js SDK project on GitHub, it will be made available in the release pending for the first Tuesday of February. If you would like to use it before then, simply use npm to install the updated library directly from GitHub (npm install git+

Cheers, Brett