dbgrep is a command-line tool for databases that searches for specific column entries and displays the corresponding rows, highlighting the matched column value in red in the console.
Create a directory named 'connection_profiles' in the same directory as the jar file. Then, add a connection profile for your database within that folder.
The profile files can have any file ending. Example connection profiles can be found under /connection_profiles.
For more information use the --help command.
mvn clean package -DskipTests
java -jar dbgrep-1.0.jar --help
To test the tool, you can use the test databases by starting the test environment as described below in the docker section.
To start test environment execute following command in project root directory:
docker compose up
With test data:
docker compose --profile flyway up
To delete all containers execute:
docker compose --profile flyway down
To restart flyway migration execute the command:
docker compose --profile flyway restart flyway_mysql flyway_postgres
To start test environment execute following command in project root directory while docker desktop is running:
docker compose --profile flyway up
Everything else can be done in ui.
Start the test database as described above without test data.
Use following command to execute unit tests:
mvn surefire:test
Use following command to execute integration tests:
mvn failsafe:integration-test
Use following command to check your code quality locally:
mvn -Pcicdprofile checkstyle:check pmd:check spotbugs:check
For test coverage:
mvn -Pcicdprofile install
(Test coverage can be viewed in target/site/jacoco-it or jacoco-ut/index.html)
For separate execution:
mvn -Pcicdprofile checkstyle:check
mvn -Pcicdprofile pmd:check
mvn -Pcicdprofile spotbugs:check