https://github.com/mfvanek/pg-index-health-demo
Demo apps for pg-index-health library
https://github.com/mfvanek/pg-index-health-demo
gradle gradle-8 hacktoberfest java java-21 junit5 kotlin-dsl liquibase lombok lombok-gradle mutation-testing pitest postgres postgresql testcontainers
Last synced: 3 months ago
JSON representation
Demo apps for pg-index-health library
- Host: GitHub
- URL: https://github.com/mfvanek/pg-index-health-demo
- Owner: mfvanek
- License: apache-2.0
- Created: 2019-12-30T07:00:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-10T18:07:25.000Z (3 months ago)
- Last Synced: 2025-03-16T14:39:15.751Z (3 months ago)
- Topics: gradle, gradle-8, hacktoberfest, java, java-21, junit5, kotlin-dsl, liquibase, lombok, lombok-gradle, mutation-testing, pitest, postgres, postgresql, testcontainers
- Language: Java
- Homepage:
- Size: 1.13 MB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# pg-index-health-demo
Demo project for [pg-index-health](https://github.com/mfvanek/pg-index-health) library.
[](https://github.com/mfvanek/pg-index-health-demo/actions "Java CI")
[](https://github.com/mfvanek/pg-index-health-demo/blob/master/LICENSE "Apache License 2.0")
[](https://codecov.io/gh/mfvanek/pg-index-health-demo)[](https://sonarcloud.io/summary/new_code?id=mfvanek_pg-index-health-demo)
[](https://sonarcloud.io/summary/new_code?id=mfvanek_pg-index-health-demo)
[](https://sonarcloud.io/summary/new_code?id=mfvanek_pg-index-health-demo)
[](https://sonarcloud.io/summary/new_code?id=mfvanek_pg-index-health-demo)
[](https://sonarcloud.io/summary/new_code?id=mfvanek_pg-index-health-demo)[](https://dashboard.stryker-mutator.io/reports/github.com/mfvanek/pg-index-health-demo/master)
## Modules
* [pg-index-health-demo-without-spring](pg-index-health-demo-without-spring)
* Without Spring/Spring Boot
* [pg-index-health-spring-boot-demo](pg-index-health-spring-boot-demo)
* With Spring Boot## Tech stack
* Java 21
* Testcontainers### Previous versions
If you search for version with [Embedded PostgreSQL](https://github.com/mfvanek/pg-index-health-demo/blob/4269907dc3e5be92fbe90346755bd107260c0c55/src/main/java/io/github/mfvanek/pg/index/health/demo/DemoApp.java#L28)
please take a look at release [0.6.1](https://github.com/mfvanek/pg-index-health-demo/releases/tag/v.0.6.1)
If you search for Java 8 compatible example please take a look at release [0.6.2](https://github.com/mfvanek/pg-index-health-demo/releases/tag/v.0.6.2)## Advantages
With **pg-index-health** library you will be able to:
1. [collect indexes health data](https://github.com/mfvanek/pg-index-health-demo/blob/master/src/main/java/io/github/mfvanek/pg/index/health/demo/DemoApp.java) in production environment;
2. [analyze your database structure in functional tests](https://github.com/mfvanek/pg-index-health-demo/blob/master/src/test/java/io/github/mfvanek/pg/index/health/demo/IndexesMaintenanceTest.java) and prevent many of typical errors;
3. [analyze your database configuration](https://github.com/mfvanek/pg-index-health-demo/blob/master/src/main/java/io/github/mfvanek/pg/index/health/demo/ConfigurationDemoApp.java) to prevent using of default values for important options;
4. [manage your database statistics](https://github.com/mfvanek/pg-index-health-demo/blob/master/src/main/java/io/github/mfvanek/pg/index/health/demo/StatisticsDemoApp.java) in production environment;
5. [generate migrations](https://github.com/mfvanek/pg-index-health-demo/blob/master/src/main/java/io/github/mfvanek/pg/index/health/demo/DemoApp.java) to fix your database structure.## Local development
### Linting
#### macOS/Linux
To run super-linter locally:
```shell
docker run \
-e RUN_LOCAL=true \
-e USE_FIND_ALGORITHM=true \
-e VALIDATE_SQLFLUFF=true \
-v $(pwd):/tmp/lint \
ghcr.io/super-linter/super-linter:slim-v7.1.0
```#### Windows
Use `cmd` on Windows:
```shell
docker run ^
-e RUN_LOCAL=true ^
-e USE_FIND_ALGORITHM=true ^
-e VALIDATE_SQLFLUFF=true ^
-v "%cd%":/tmp/lint ^
ghcr.io/super-linter/super-linter:slim-v7.1.0
```