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
0
votes
2 answers

Sorting CouchDB result by unix timestamp and paginate

I am struggeling to get pagination working for a few days now. I have a database with docs and have a few to have the timestamp as key to sort descending. But I can't seem to get the next set of docs ... If I run it, I get the top 5 docs. When I try…
BananaAcid
  • 3,221
  • 35
  • 38
0
votes
1 answer

How to get all documents in a specific range of time?

Like said in the title, im trying to get all docs in a specific time range. I have documents in my database with a timestamp stored. I was looking for something like here Querying CouchDB documents between a start date and an end date but i didnt…
Pavel
  • 129
  • 1
  • 4
0
votes
1 answer

Nano does not understand qoutation in the url

I am using nano library to query couch. I am trying to get just the _design documents so I have the following url: nano.get(encodeURIComponent(JSON.stringify(`_all_docs?startkey="_design/"&endkey="_design0"&include_docs=true`))); when I try the…
Learner
  • 1,686
  • 4
  • 19
  • 38
0
votes
1 answer

Hyperledger fabric client credential store using couchdb(CouchDBKeyValueStore)

I'm using Hyperledger Fabric SDK for node.js to enroll a user. I'm using this code to deploy in fabric. It uses FileKeyValueStore (uses files to store the key values) to store client's user credential. I want to use CouchDBKeyValueStore to store…
0
votes
1 answer

Index & sort with newly introduced field

I have a document structure as below: { "_id": "6ed3d427045228dce9e3b38d111cb046", "_rev": "1-952bddae5572fbf2b0ce4a165c19c98b", "type": "USER", "name": "ABC", "email": "abc@gmail.com", "phone": "024578963" } This is NodeJS app and I am…
mapmalith
  • 1,303
  • 21
  • 38
0
votes
1 answer

Unable to return value from nano.view callback

Unable to store value outside of callback scope I have tried declaring an array, an object and an empty variable outside of the callback scope and nothing is working. router.post('/login', async (req, res, next) => { try { const user = await…
Natasha Kelly
  • 73
  • 1
  • 12
0
votes
1 answer

AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

Here is my setup: CouchDB: 2.3.1 LoopBack: 1.11.2 NPM: 6.9.0 Using LoopBack API Explorer, here is the rest call made: curl -X PUT "http://localhost:3000/skilltypes/0" -H "accept: */*" -H "Content-Type: application/json" -d…
TechFanDan
  • 3,329
  • 6
  • 46
  • 89
0
votes
1 answer

How to simultaneously constrain one key with a range and constrain another key with an exact match?

I created a test Node.js script that uses Nano to generate some example data documents, create two views, and run two test queries. Each data document has two keys: "a" and "b". I'd like my query to result in all of the documents where "a" is…
Jason
  • 2,725
  • 2
  • 14
  • 22
0
votes
0 answers

Using Bluebird Promise.map concurrency parameter to speed up query on CouchDBs

In one of my queries, I am collating ~250 calls to one array of results using Bluebird Promise.map function. Each individual call takes ~60ms when executed by itself so with a concurrency of 10 I would expect the result of the main query to be…
Chapo
  • 2,563
  • 3
  • 30
  • 60
0
votes
0 answers

CouchDB integer size

I need to store documents that have several arrays of possibly hundreds of thousands of integers to a CouchDB database. I have done some testing with node.js and the nano package by putting random numbers to arrays. I first tested by using integers…
user2563661
  • 314
  • 1
  • 3
  • 13
0
votes
1 answer

CouchDB error -Malformed AuthSession cookie -- version 2,2

I install couchDB 2.2 and it is running on a remote server (ubuntu) . Now , I have a node application with NPM module NANO instaled on another machine.. However, I get an error when I tried to create a document. "Error getting existing document:…
user2570135
  • 2,669
  • 6
  • 50
  • 80
0
votes
2 answers

making node wait for db call to get completed

I just started writing node.js code. I'm writing a code that extracts data from a pdf file, cleans it up and stores it in a database (using couchdb and accessing that using nano library). The problem is that the calls are being made…
galeej
  • 535
  • 9
  • 23
0
votes
1 answer

No of documents in a view of couchdb using nano

As i am new to Node js ,could anyone please help me to provide procedure to find number of documents in a view of couchdb using nano. for example , I have view '_design/settings/_view/settings' in couch db .Using nano i want to find no of documents…
rreddy
  • 1
  • 1
0
votes
1 answer

unable to use 'include_docs' in fetchRevs as it is neither in BulkFetchDocsWrapper interface nor in DocumentFetchParams interface

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/bb1cc0e143f40f52a8d771e93036fc211df85cfb/types/nano/index.d.ts#L160 i am new to couch db and i know, i can use "fetch" if i want doc in result but i want doc in result based on some conditions…
xExplorer
  • 19
  • 2
0
votes
1 answer

insert document into multiple instance of couch DB in Node JS with all success and failure result in any way possible

i have array of db like const dbArr = ["http://localhost:5984", "http://xyz_couchdb.com:5984"] data to insert let data ={ _id: 324567, name: Harry, gerder: male } here is the logic i am using nano…
xExplorer
  • 19
  • 2
1 2 3
8 9