Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bearddan2000/groovy-cli-gradle-ssl-postgres-data-type-user-defined

Creates a small database table
https://github.com/bearddan2000/groovy-cli-gradle-ssl-postgres-data-type-user-defined

cli data defined driver gradle groovy log4j postgres ssl type user

Last synced: about 2 months ago
JSON representation

Creates a small database table

Awesome Lists containing this project

README

        

# groovy-cli-gradle-ssl-postgres-data-type-user-defined

## Description
Creates a small database table
called `dog`. This table, `dog`, has been normalized to 3NF.
Two new tables have been added, `breedLookup` and `colorLookup`.

Creates a new table `dog_expanded` that joins
`dog`, `breedLookup` and `colorLookup`. Added clustered indexes on
`dog`.breedId and `dog`.colorId.

Turned `dog_expanded` into a view with an implicit index on `dog_expanded`.id.

Defined a type `type_int_int` that acts as a return type.
Using table function with the aggregate function
COUNT, create a new view `breed_count`.

All output normally
seen in a terminal will be in `groovy-srv/log` which will dump to the screen. The project may seem to hang but the logs from the container must be written to the project this can take up to 3 min.

Uses self-sign ssl.

## Tech stack
- groovy
- gradle
- log4j
- postgres driver

## Docker stack
- alpine:edge
- gradle:jdk11
- postgres

## To run
`sudo ./install.sh -u`
Creates groovy-srv/log

## To stop
`sudo ./install.sh -d`
Removes groovy-srv/log

## For help
`sudo ./install.sh -h`

## Credit
- [Pretty sql print](https://github.com/htorun/dbtableprinter)
- [User defined type](https://www.postgresqltutorial.com/postgresql-tutorial/postgresql-user-defined-data-types/)