npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pgddev

v1.1.2

Published

CLI to automate repetitive tasks in PostgreSQL

Downloads

52

Readme

PGDDEV

Setup

Installing pgddev

$ npm i -g pgddev or $ yarn global add pgddev

Creating a new project

Creating a new project is quite simple with the PGDDEV. you can create a new PGDDEV project with the following commands in your OS terminal:

$ pgddev new project_name

Setting up .env

For your PGDDEV project to work correctly you must configure the application .env as follows:

DB_HOST=my_host
DB_PORT=my_port
DB_DATABASE=my_database
DB_PASSWORD=my_password
DB_USER=my_username

Avaliable commands

Creating a DML

$ pgddev dml table_name

Creating a standard DML framework facilitates and standardizes the development process for any application, so much of the CRUD work will be abstracted.

Available instructions

| Instruction | Functionality | | ----------------------------- | ----------------------------------------------------- | | -s or --schema | Specifies the schema | | -f or --folder | Specifies the folder where scripts will be generated. | | -p or --pk_name | Specifies Primary Key name | | -t or --pk_type | Specifies Primary Key type | | -d or --deploy | Deploy DML | | -w or --with-delete-software | With Software Delete or Not |

Example

Create the DML structure in the database, with the specified schema, in the specified folder and deploy.

pgddev dml table_name -s schema_name -f folder_path --deploy

Using DML

Generated files

  • dmlapi_table_name_j2r.sql
  • dmlapi_table_name_r2j.sql
  • dmlapi_table_name_merge.sql
  • dmlapi_table_name_purge.sql
  • dmlapi_table_name_select.sql

Query examples

| Query | Description | | ------------------------------------------------------------ | --------------------------------------------------------------------------------- | | schema_name.dmlapi_table_name_j2r(payload::jsonb) | turns a jsonb into table record. | | schema_name.dmlapi_table_name_r2j(payload::table_name) | receives a record from the table and transforms it into jsonb. | | schema_name.dmlapi_table_name_merge(payload::jsonb) | Generates a JSON in the exact format of the table from a RECORD input. | | schema_name.dmlapi_table_name_purge(resource_id, user_id) | Soft delete a record in a table from the resource id and user id that deleted it. | | schema_name.dmlapi_table_name_select(resource_id, locking) | Returns record from id (locking=true locks the record at transaction time) |

Deploy a DML Scripts

$ pgddev deploy script_or_folder_name

Passing in the path of a script or folder will execute all SQL commands in the scripts..

End