Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
couchdb-query-helper
Advanced tools
A module to help query couch DB in node applications
couchdb-query-helper is a library that can help you build query, schema, and control your database more easier.
Presently can only be used on the NodeJS version 8 or higher.Supports CouchDb version 15.10 or higher.
npm i couchdb-query-helper
couchdb-query-helper module is itself a function which takes a configuration object.
const queryHelper = require('couchdb-query-helper')
.connection({
host: 'localhost',
protocol: 'http://',
port: '5984',
user: 'admin',
pass: 'admin'
});
queryHelper
.query()
.selectAll(tableName)
.then((responseData) => console.log(responseData))
.catch((err) => console.log(err));
queryHelper
.db()
.showDatabases()
.then((responseData) => console.log(responseData))
.catch((err) => console.log(err));
queryHelper
.query()
.insert(documentId, documentData, databaseName)
.then((responseData) => console.log(responseData))
.catch((err) => console.log(err));
queryHelper
.query()
.delete(documentId, databaseName)
.then((responseData) => console.log(responseData))
.catch((err) => console.log(err));
array_of_key
represents the key that you are searching for and array_of_values
represents the values that the key should have.
queryHelper
.query()
.select(array_of_key, array_of_values, databaseName)
.then((responseData) => console.log(responseData))
.catch((err) => console.log(err));
queryHelper
.db()
.createDatabase(dbName)
.then((responseData) => console.log(responseData))
.catch((err) => console.log(err));
queryHelper
.db()
.dropDatabase(dbName)
.then((responseData) => console.log(responseData))
.catch((err) => console.log(err));
You can use the regular JSON object for queries, to know more about the select option visit http://docs.couchdb.org/en/stable/api/database/find.html
queryHelper
.query()
.bareSelect(dbName, selectorSample)
.then((responseData) => console.log(responseData))
.catch((err) => console.log(err));
FAQs
Module to help query couchDB in NodeJs applications
The npm package couchdb-query-helper receives a total of 0 weekly downloads. As such, couchdb-query-helper popularity was classified as not popular.
We found that couchdb-query-helper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.