https://github.com/michaelmior/java-postgres
https://github.com/michaelmior/java-postgres
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/michaelmior/java-postgres
- Owner: michaelmior
- Created: 2018-09-17T14:40:33.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2023-01-30T14:00:34.000Z (over 2 years ago)
- Last Synced: 2024-12-31T12:47:12.250Z (4 months ago)
- Language: Java
- Size: 65.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Getting started
To execute a simple test program against the `foodmart` dataset, this assumes you have a correctly configured [password file](https://www.postgresql.org/docs/current/static/libpq-pgpass.html) and a schema named `foodmart` which contains the data.
Simple run `./gradlew run` to execute a query against the data.
The only dependency required for your own programs is the PostgreSQL java driver.
If you choose, you can [download the JAR file](https://repo1.maven.org/maven2/org/postgresql/postgresql/42.3.1/postgresql-42.3.1.jar) for use in your own projects, but you can also use a build system like [Gradle](https://gradle.org/) used by this project.
For generating test data, some programs also make use of the [JFairy](https://www.javadoc.io/doc/io.codearte.jfairy/jfairy/0.5.9) library.## Other programs
The repository contains several different programs.
By default the program `SQLTest` is run.
To run another program, execute `./gradlew -PmainClass=PROGRAM_NAME`.| Program | Description |
|-----------|--------------------------------------------------|
| `SQLFake` | Populate the `hospital` schema with sample data |
| `SQLTest` | Run a simple query against the `foodmart` schema |