-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doobie integration #541
Doobie integration #541
Conversation
To avaid libraries conflict removed `cats` version 0.9 dependency, because newer version 1.4 of `cats` is depended on doobie. Commented code that interferes to Scala version upgrade.
This commit intended for implementation of the JobRepository with Doobie. Now HikariJobRepository can work with PostgreSQL as well as with H2 database. Because of different DDL syntax migration directory for the H2 directory was moved to /db/migrations/h2 and PostgreSQL migration scripts were created into /db/migrations/postgresql New class JobDetailsRecord - helper class intended for data extraction with Doobie. HikariDataSourceTransactor is Doobie transactor with Hikari DB pool. HikariJobRepository - base implementation of data manipulation with Doobie. HikariRepoSpec - abstract tests for HikariJobRepository. HikariH2RepoSpec - concrete tests for H2 HikariPgRepoSpec - concrete tests for PostgreSQL. This class marked as "abstract" to not break any CI builds. You can remove abstract marker after test environment will be ready for PostgreSQL.
HikariPgRepoSpec can't pass Travis CI tests. Mark it abstract while Travis CI will be ready for it.
Great! Thanks for your contribution. Now, we almost ready to publish a new release. Everything is fine except tests and Travis setup. Actually, it would be enough just to remove last 5 commits to merge this PR. If you don't have enough time, I can complete this testing stuff after merge by myself. |
I think only last four commits are extra. This one 8dfd163 is mandatory for the project build. I'd appreciate you help if you will convert these tests to the integration test by yourself. |
Yes, you right - 4 would be enough. |
I've just removed last three commits. The fourth mark Pg test as abtract and is mandatory to run tests without any fail. |
These changes add doobie integration with Hikari connection pool. Supported databases are H2 and PostgreSQL. Currently Slick integration is not removed and may be used as well as early.
Default master configuration is H2 over new Doobie with Hikari coonection pool.