You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#43: Upgrade Slick version and add Slick-pg dependency (#45)
* Introduced slick-pg optional dependency to increase the number of supported types
* created a Slick profile to use the Slick-pg types (most of them)
* added implicits to use with UUID type
* `SlickPgFunction` and `SlickPgFunctionWithStatusSupport` traits were renamed to `SlickFunction` and `SlickFunctionWithStatusSupport`as they are not really Postgres dependent
* added new alternative constructor to `DBSchema` and `DBFunction`
* extended `README.md` to contain info on Slick module and integration tests
Copy file name to clipboardExpand all lines: README.md
+54-3Lines changed: 54 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,8 @@ ___
13
13
-[What is fa-db](#what-is-fa-db)
14
14
-[Usage](#usage)
15
15
-[Concepts](#concepts)
16
-
-[How to generate code coverage report](#how-to-generate-code-coverage-report)
16
+
-[Slick module](#slick-module)
17
+
-[Testing](#testing)
17
18
-[How to Release](#how-to-release)
18
19
<!-- tocstop -->
19
20
@@ -49,7 +50,7 @@ within the application.**
49
50
Currently, the library is developed with Postgres as the target DB. But the approach is applicable to any DB supporting stored procedure/functions – Oracle, MS-SQL, ...
50
51
51
52
52
-
###Usage
53
+
## Usage
53
54
54
55
#### Sbt
55
56
@@ -105,15 +106,65 @@ Modules:
105
106
106
107
Text about status codes returned from the database function can be found [here](core/src/main/scala/za/co/absa/fadb/status/README.md).
107
108
108
-
## How to generate code coverage report
109
+
110
+
## Slick module
111
+
112
+
Slick module is the first (and so far only) implementation of fa-db able to execute. As the name suggests it runs on
113
+
[Slick library](https://github.com/slick/slick) and also brings in the [Slickpg library](https://github.com/tminglei/slick-pg/) for extended Postgres type support.
114
+
115
+
It brings:
116
+
117
+
*`class SlickPgEngine` - implementation of _Core_'s `DBEngine` executing the queries via Slick
118
+
*`trait SlickFunction` and `trait SlickFunctionWithStatusSupport` - mix-in traits to use with `FaDbFunction` descendants
119
+
*`trait FaDbPostgresProfile` - to bring support for Postgres and its extended data types in one class (except JSON, as there are multiple implementations for this data type in _Slick-Pg_)
120
+
*`object FaDbPostgresProfile` - instance of the above trait for direct use
121
+
122
+
#### Known issues
123
+
124
+
When getting result from `PositionedResult` for these types `HStore` -> `Option[Map[String, String]]` and
125
+
`macaddr` -> `MacAddrString` type inference doesn't work well.
/* This is an example of how to deal with overloaded DB functions - see different input type: Long vs what's in the class type: (String, Option[Int]) */
connectionPool = "HikariCP" //use HikariCP for our connection pool
3
+
dataSourceClass = "org.postgresql.ds.PGSimpleDataSource" //Simple datasource with no connection pooling. The connection pool has already been specified with HikariCP.
0 commit comments