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’);
bucket.enableN1ql(“host:8093”);
var query = n1ql.fromString(“SELECT * FROM news”);
bucket.query(query,function(err,res){
if(err){
console.log("error: " + err);
return;
}
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.
Thanks
Johann