https://github.com/ozum/pg-generator-example
Example generator for pg-generator.
https://github.com/ozum/pg-generator-example
Last synced: about 2 months ago
JSON representation
Example generator for pg-generator.
- Host: GitHub
- URL: https://github.com/ozum/pg-generator-example
- Owner: ozum
- License: mit
- Created: 2021-02-25T11:36:52.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-13T11:38:12.000Z (about 4 years ago)
- Last Synced: 2024-10-29T23:34:58.450Z (7 months ago)
- Language: TypeScript
- Size: 353 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pg-generator-example
Example plugin for pg-generator, that creates model files for several ORMs and other purposes.
- [Installation](#installation)
- [Synopsis](#synopsis)
- [Details](#details)
- [Available Examples](#available-examples)# Installation
`npm install pg-generator-example`
# Synopsis
```ts
$ pgen example --out-dir models --clear --relation-name-functions optimal"
``````ts
$ pgen example:sequelize6 --out-dir models --clear --relation-name-functions optimal"
``````ts
$ pgen example:objection2 --out-dir models --clear --relation-name-functions optimal"
``````ts
$ pgen example:schwifty5 --out-dir models --clear --relation-name-functions optimal"
``````ts
$ pgen example:md --out-dir db-docs --clear --relation-name-functions optimal"
```# Details
This is a [pg-generator](https://www.pg-generator.com) plugin to provide example generators and templates for tutorial purposes. Use it via pg-generator.
## Available Examples
As indicated following generators are just examples to help you to build yours. Besides personal opinions, every ORM requires careful practices. As a result, we can't maintain ORM codes we are not using. Therefore, see them as a good effort. Even they are not guaranteed to work with current versions of the respective ORM library.
| Name | Description |
| ------------ | ----------------------------------------------------------------------------------- |
| `app` | Example of composability. |
| `md` | Example of how to create database documentation in markdown. |
| `objection2` | Example of model files for [objection](https://vincit.github.io/objection.js/) ORM. |
| `report` | Example of a simple report of the database. |
| `schwifty` | Example of model files for [schwifty](https://github.com/hapipal/schwifty) ORM. |
| `sequelize6` | Example of model files for [sequelize](https://sequelize.org) ORM. |
| `tutorial` | Example of how to create your generators. |