
Security News
TC39 Advances 11 Proposals for Math Precision, Binary APIs, and More
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
managercouchdb
Advanced tools
ManagerCouchdb is a javascript library for managing CouchdDB servers and databases. This library was created and is maintained at the Center for Neurological Imaging (https://cni.bwh.harvard.edu/).
npm install --save managercouchdb
const managerCouchdb = require('managerCouchdb')
const serverManagerCouchdb = await managerCouchdb.getServerManager("localhost:5984")
const dbManagerCouchdb = await managerCouchdb.getDatabaseManager("localhost:5984", "databasename")
Checkout project with git and run test/testAll
and test/testDesign
node scripts.
Check SERVER_URL
and DB_NAME
settings if they fit to your environment.
var serverRunning = await serverManagerCouchdb.isServerRunning()
var serverInformation = serverManagerCouchdb.getServerInformation()
var dbExist = await serverManagerCouchdb.databaseExist("databasename")
var resDestroyDatabase = await serverManagerCouchdb.destroyDatabase("databasename")
var resCreateDb = await serverManagerCouchdb.createDatabase("databasename")
var dbInformation = await dbManagerCouchdb.getDatabaseInformation()
var resInsertDoc = await dbManagerCouchdb.insertDocument(document)
var resDestroyDoc = await dbManagerCouchdb.destroyDocument(documentId, revisionId)
var resInsertDocsBulk = await dbManagerCouchdb.insertDocumentInBulk(documents)
var document = await dbManagerCouchdb.getDocument(documentId)
var viewResults = await dbManagerCouchdb.getView(designName, viewName, keys)
var resView = await dbManagerCouchdb.getViewWithQuery(designName,viewName, queryParams,includeDocs);
var design = await dbManagerCouchdb.getDesign()
var resFetch= await dbManagerCouchdb.fetchDocumentsInBulk(toBeFetched);
var resDel = await dbManagerCouchdb.deleteDocumentInBulk({"docs":arrayOfDocIds});
Dependencies:
request-promise-native
from dependencies (package was blocking upgrade of nano
to version > 8.2.3)nano
to version 10.0.0
Added db document functions:
getDesign
for getting all design and view documents,deleteDocumentsInBulk
for deleting array of documents,fetchDocumentsInBulk
for fetching array of documents,getViewWithQuery
for getting view with different key optionsRemoved db document functions:
getViewWithMultipleQueries
: not needed anymore, replaced partially by getViewWithQuery
Modified db document functions:
destroyDocument
: revision parameter is optional,Tests:
FAQs
Manager for CouchdDB servers and databases
We found that managercouchdb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.