I want to update an existing document in couchdb. I have an image and i want to add it to an existing document in the db without lose the previus fields.
I'm using nodejs with nano.
tanks, this put me in the right orientation. At the end i do it in…
Nano doesn't provide documentation for temporary views, is there any undocumented method? Failing that, how would you advise somebody execute a temporary view using a nano-like syntax. Currently I am attempting to create the view as _view/guid,…
I wanted to check how many more inserts CouchDB can handle when compared to MySQL. My test was simple: for 10 seconds keep inserting {firstName: "Testing 001", lastName: "Testing 002"} and compare the number of documents/rows. The results I got were…
I'm trying to insert a binary attachment to CouchDB with nano. I have a JPG in data returned by http.request.
I save it with nano as follows
db.attachment.insert( id, 'content', self._data, contentType, {rev: rev}, function(err, body) {
…
I would like to read a csv file and upload each row to a couchdb using a grunt task. At this point I am not yet doing any database validation such as checking if the record already exists but will have to do that at some point also.
Currently this…
I have the following method for registering users:
// Registration method
exports.register = function(req, res) {
var username = req.body.username,
password = req.body.password,
first = req.body.first;
last =…
I'm using nano with couchDB, and I am just trying to do a simple update on a document to add a new field. For example, let's say I have a document called foo. The only field in it right now is 'bar', with some value. I then attempt to do db.insert…
I'm using now.js with nano (CouchDB library) to fill a select with options.
Server:
everyone.now.getThings = function(thing) {
var self = this;
return db.view('lists', 'some_things', function(error, data) {
var list =…
I need to recreate a document in CouchDB. I use nano package, but I think the problem is the same with API calls.
What I'm currently doing is to make two calls:
await dbHandle.bulk({docs: [{_id: "abc", _rev: "12-aaaa", _deleted: true}]});
await…
To implement sorting, in CouchDB we have to create an index (otherwise the corresponding mango query fails). I haven't found a way to do this in Fauxton (if I have missed something, please comment in Github), so I've decided to create it…
Couchdb runs fine through the command prompt, however, when I try to access a db through nano I get a ECONNREFUSED error.
I am using nano version 10.0.0 and I have couch db installed locally and running on port 5984.
Here is my code:
const nano =…
I have been looking around for well over 2 hours now trying to find SOMETHING that would give me any kind of direction with this issue but simply cannot find it.
I am using Node.js and CouchDB with docker-compose. I am also using express and nano. I…
I'm setting up a login system with nano, passport and couchdb. Things are mostly working but when couchdb is offline I'm given this error:
(node:893) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:5984
at…