Skip to content

npm

Schema and tables for tracking npm package metadata and daily download counts.

npm · Schema and tables for tracking npm package metadata and daily download counts.

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
101477npmnpm0.0.1FEATMITC
Relationships
Requiresbtree_gist plpgsql uuid-ossp

Usage

Sources:

npm — Schema and tables for tracking npm package metadata and daily download counts. Use it when an application needs this specific database capability. Its extension dependencies must be installed and validated first.

Core Workflow

CREATE EXTENSION npm;

Install the extension in the intended database, run the smallest upstream example above when available, and verify the installed version and returned values before integrating it into application SQL.

Important Objects

  • npm_count.set_id_from_pkg_date() is an extension function and returns trigger.
  • npm_count.update_updated_at() is an extension function and returns trigger.
  • npm_count.validate_download_date() is an extension function and returns trigger.
  • npm_count.missing_download_dates is an extension-defined view.
  • npm_count.category is a table installed or managed by the extension.
  • npm_count.daily_downloads is a table installed or managed by the extension.
  • npm_count.npm_package is a table installed or managed by the extension.
  • npm_count.package_category is a table installed or managed by the extension.
  • npm_count is a schema created by the extension.

Requirements and Caveats

  • The reviewed control file declares default version 0.0.1.
  • Install the confirmed extension dependencies first: btree_gist, plpgsql, uuid-ossp.
  • The control file marks the extension as non-relocatable.
  • The control file does not require superuser-only installation.
  • Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.

Table reader