Security News
How Threat Actors are Abusing GitHub’s File Upload Feature to Host Malware
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
couchdb-query-helper
Advanced tools
Readme
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 1 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
GitHub is susceptible to a CDN flaw that allows attackers to host malware on any public repository.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.