0.0.18 • Published 5 months ago

@cotter45/pg-fullservice v0.0.18

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@cotter45/pg-fullservice

Description

@cotter45/pg-fullservice is a full-service PostgreSQL server and client code generator for Typescript, Javascript, and Node.JS. It generates query models for projects using Joi and PostgreSQL queries instead of an ORM. It can generate files in TypeScript or JavaScript for the client or API and is framework agnostic.

NOTE: This is not a full ORM. It is a code generator for PostgreSQL queries and Joi validation models, simply meant to save time writing boilerplate code especially in Typescript projects.

Installation

You can use npx to run this package without installing it:

npx @cotter45/pg-fullservice

Usage

This is a command-line application that will prompt for a schema file or PostgreSQL connection string, connect to the database, and generate files based on the selections for the output directory and the type (ts | js).

The program will first prompt for a schema file or a postgres connection string. The format of the schema file is as follows:

{
  "table_name: [
    {
      "column_name": "string",
      "data_type": "PostgreSQL data type",
      "is_nullable": "YES | NO",
      "is_foreign_key": "boolean (true | false)",
      "referenced_table_name": "string | null",
    }
  ]
}

If you choose to use a connection string, the program will connect to the database and generate the schema file for you.

Dependencies

This project depends on the inquirer npm package to run and has peer dependencies of joi and pg for the generated code.

Contact

For any issues, please visit the GitHub repository.

License

This project is licensed under the MIT License.

0.0.16

5 months ago

0.0.17

5 months ago

0.0.18

5 months ago

0.0.15

5 months ago

0.0.14

5 months ago

0.0.13

5 months ago

0.0.12

5 months ago

0.0.11

5 months ago

0.0.10

5 months ago

0.0.9

5 months ago

0.0.8

5 months ago

0.0.7

5 months ago

0.0.6

5 months ago

0.0.5

5 months ago

0.0.4

5 months ago

0.0.3

5 months ago

0.0.2

5 months ago

0.0.1

5 months ago