1.0.6 • Published 6 years ago
@kblue/pg-tools v1.0.6
Restful Database Tools for PostgreSQL
Features
- schema management
- load-schema
- resource template
- tables
- functions
- sql files
- resource template
- load-data
- load-schema
- json validation
Sub-Commands
# load schema from file
pg-tools schema --schema schema.yaml
# load schema and commit the changes
pg-tools schema --schema schema.yaml --no-tables# load schema from file
pg-tools db --connection connection.yaml --force Create Tables For Resources
| Type | Description |
|---|---|
| function-resource | access data via functions |
Function Resources
Access the data via functions.
Entity
create table si.account (
uuid uuid primary key default uuid_generate_v4(),
head jsonb not null,
body jsonb not null,
tags text[] not null default '{}'::text[]
);Example
head:
id: chris-default-account
uuid:
type: account
tags:
- default
body:Dictionaries
Currencies
https://www.currency-iso.org/dam/downloads/lists/list_one.xml