PSQL RM
Postgres Relational Mapper
Setup
- npm install @waghravi/psqlrm
- Configure database connection in .env file as per instruction in the Configuration section
- run command npm start
Configuration
Change the configuration to connect database in .env file
Key | Value | Comments |
---|---|---|
PORT | 80 | Port can be changed |
PG_DB_HOST | 127.0.0.1 | Database host can be changed |
PG_DB_PORT | 5432 | Database port can be changed |
PG_DB_USER | postgres | Database Username can be changed |
PG_DB_PASS |
|
Database Password can be changed |
PG_DB_NAME | postgres | Database Name can be changed |
Queries
- tables
- columns
- foreignkeys
- select
- distinct
- avg
- count
- max
- min
- sum
Mutation
- insert
- update
- delete
-
-
database transaction
- simple
- complex