Questions tagged [couchdb-nano]

Nano is the Official Apache CouchDB library for Node.js.

Nano is the Official Apache CouchDB library for Node.js.

132 questions
1
vote
0 answers

What is the correct way of handling the changes feed (follow) in nano?

I am using the nano follow function to monitor changes to a couchdb database. While basically working, I am unable to stop the feed without generating an exception. Here is my code: const nano = require("nano")("http://localhost:5984"); const name =…
cenuijza
  • 21
  • 1
  • 6
1
vote
1 answer

Get documents using find() method in couchdb-nano

Since CouchDB doesn't have any collections, I added a custom typeproperty to my entitys. Now I want to filter all entitys on that property, e.g. get all users by {type:'user'}. In the couchdb-doc I found a method called 'find()', which is also…
Daniel
  • 968
  • 3
  • 13
  • 32
1
vote
1 answer

How to search with couchdb nano

I am trying to search couchdb with nano, as described here: https://github.com/dscape/nano#dbsearchdesignname-searchname-params-callback But I get 'document is missing attachment'. var config = require('./config.js'); var nano =…
user4893295
  • 533
  • 6
  • 25
1
vote
1 answer

Using Promise with CouchDB nano & forEach

I need help with debugging this code/or learn efficient way to do it- I tried using bluebird.each to capture all executions within my forEach, but didn't get it work. Same with setting up a new promise with pure javascript. I need help how to…
Harris Lee
  • 93
  • 1
  • 2
  • 7
1
vote
0 answers

Bluemix Deployment

I am getting this error when I try to connect to Cloudant on Bluemix.I am running my connection on a proxy server . [ { _id: 'key1', value: 'value1', lastUpdateTime: '1453920638633' }, { _id: 'key2', value: 'value2', lastUpdateTime:…
1
vote
0 answers

NodeJS Populate select with nano from couchDB

I have multiple couchDB databases that contain multiple documents. I'm trying to populate 3 or more html selects with data from couchDB using nodeJS and nano client for couchDB. I'm trying to fetch all the documents inside a database an insert them…
Magarusu
  • 982
  • 10
  • 14
1
vote
1 answer

Distinct in CouchDB with input keys

Given documents like: [ {"id":1, "category": "cat1", "type": "type1", "line": "line1"}, {"id":2, "category": "cat1", "type": "type1", "line": "line1"}, {"id":3, "category": "cat1", "type": "type2", "line": "line1"}, {"id":4, "category": "cat1",…
Samuel Goldenbaum
  • 18,391
  • 17
  • 66
  • 104
1
vote
2 answers

Query Cloudant (using the node.js module) database for a list of documents?

Consider a database with documents that looks something like: { username: "user_1", email: "user_1@mail.com" } Now, I'm given a list of usernames, i.e: ["user_1", "user_2", "user_N"] And I return a list of their…
NadavL
  • 390
  • 2
  • 12
1
vote
1 answer

Sorting CouchDB result by value

I'm brand new to CouchDB (and NoSQL in general), and am creating a simple Node.js + express + nano app to get a feel for it. It's a simple collection of books with two fields, 'title' and 'author'. Example document: { "_id":…
SchattenJager
  • 333
  • 3
  • 15
1
vote
1 answer

How to update a document in couchdb by using nano

So in couchdb using nano if you don't know _rev of the document, the only way to update it is to use db.atomic which needs some design documents to be uploaded to couchdb. Am I right? I would like to know if there is any better way to have the…
user3399784
1
vote
1 answer

Is it possible to dynamically add views in cloudant (couchdb) through node.js using nano

I am using cloudant-couchdb for the first time and I just got stuck with this problem. I am trying to insert a view into my database dynamically through my node.js server. Here is my code. app.post("/listSections", function(req, res) { var…
Kashif Kai
  • 33
  • 5
1
vote
2 answers

Couchdb using nano , how to write search query

I am facing problem using couchdb. I am using nano module for this in nodejs. How can I implement search like match for user name and password. I tried this body.rows.forEach(function(row) { if(row.doc._id==user_id &&…
Manraj
  • 61
  • 1
  • 5
1
vote
1 answer

Node.js nano library for couchdb: timeout needed

I've been working with the nano library, and found myself with a need for having timeouts for my couchdb requests. I'm using db.search/db.get/db.destroy/db.insert and as far as I could tell from the documentation there's no easy way to add a…
Dror Aharon
  • 143
  • 1
  • 1
  • 6
1
vote
3 answers

ECONNREFUSED when using node with nano and couchdb

I was using nodejs + nano + couchdb for my application successfully up until today. For some reason all of a sudden I'm getting ECONNREFUSED when I try to run my application. If I try to query the database using the web browser or using a different…
MorningDew
  • 503
  • 3
  • 9
1
vote
1 answer

Custom function to check if documents exists in CouchDB nodejs nano

I've been looking for an answer on Google, and based on the results found, I am able to check whether a table exists or not in CouchDB, using nano module. However, when I try to make it a custom function, it always return "undefined" no matter what.…
cuzmAZN
  • 377
  • 1
  • 7
  • 25
1 2 3
8 9