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 =…
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…
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 =…
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…
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:…
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…
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…
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":…
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…
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…
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 &&…
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…
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…
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.…