Sample code for usage of https://github.com/upper/db
- install postgres
reference https://hub.docker.com/_/postgres
docker run \
--name my-postgres \
-e POSTGRES_PASSWORD=my-secret \
-e POSTGRES_USER=my-user \
-e POSTGRES_DB=my-db \
-p 50000:5432 \
-d \
postgres
- build
make
- run
./tmp/sample-dal -h
Usage: sample-dal <command>
Flags:
-h, --help Show context-sensitive help.
Commands:
check-conn
connect test
create-schema
create tables
collections
list collections
select
select table
Run "sample-dal <command> --help" for more information on a command.