Security News
New axobject-query Maintainer Faces Backlash Over Controversial Decision to Support Legacy Node.js Versions
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
couchdb-indexer
Advanced tools
Readme
Both a requireable module and a CLI tool for indexing (caching) CouchDB views.
The utility functions by retrieving a database's design documents and then requesting a single row from a single view on each design document. The effect is that all views are then indexed and results can be thereafter retrieved without delay.
Options exist to filter the design documents that are indexed and to limit the number of threads used for indexing.
$ npm install --save couchdb-indexer
Works with both callbacks and promises.
var ixcouch = require('couchdb-indexer');
// callback
ixcouch('http://localhost:5984/my-db', function ( err ) {
// ...
});
// promise
ixcouch('http://localhost:5984/my-db').then(function () {
// success
});
Optionally pass an options object as the second argument. Properties:
[options.filter=null] {string|RegExp}
: Only index views on design docs whose names match RegExp[options.maxActiveTasks=NaN] {integer}
: View queries are queued so as to attempt to limit the maximum number of concurrent active tasks on the CouchDB server.$ npm install -g couchdb-indexer
$ ixcouch my-db
$ ixcouch [options] <database_url>
--filter=<string>
Only index views on design docs whose names match JavaScript RegExp
--max-active-tasks=<integer>
View queries are queued so as to attempt to limit the maximum number of concurrent active tasks on the CouchDB server.
Active tasks are queried via route: GET {server_url}/_active_tasks.
By default, there is no maximum - i.e. all view queries are sent simultaneously.
DATABASE URL
Can be supplied in various formats:
Full URL
{host}/{database_name} - inferred protocol: http
:{port}/{database_name} - inferred protocol: http; inferred hostname: 127.0.0.1
{database_name} - inferred protocol: http; inferred host: 127.0.0.1:5984
FAQs
Create or update indexes for all of your CouchDB via a single command / call.
The npm package couchdb-indexer receives a total of 0 weekly downloads. As such, couchdb-indexer popularity was classified as not popular.
We found that couchdb-indexer 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
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
Security News
Results from the 2023 State of JavaScript Survey highlight key trends, including Vite's dominance, rising TypeScript adoption, and the enduring popularity of React. Discover more insights on developer preferences and technology usage.
Security News
The US Justice Department has penalized two consulting firms $11.3 million for failing to meet cybersecurity requirements on federally funded projects, emphasizing strict enforcement to protect sensitive government data.