Add caveat about HikariCP username
This commit is contained in:
parent
79554beb0e
commit
87acc3d3cb
1 changed files with 2 additions and 0 deletions
|
|
@ -174,6 +174,8 @@ Then import the appropriate classes into your code:
|
|||
|
||||
Finally, create the connection pooled datasource. `db-spec` here contains the regular `next.jdbc` options (`:dbtype`, `:dbname`, and maybe `:host`, `:port`, `:classname` etc). Those are used to construct the JDBC URL that is passed into the datasource object (by calling `.setJdbcUrl` on it). You can also specify any of the connection pooling library's options, as mixed case keywords corresponding to any simple setter methods on the class being passed in, e.g., `:connectionTestQuery`, `:maximumPoolSize` (HikariCP), `:maxPoolSize`, `:preferredTestQuery` (c3p0).
|
||||
|
||||
Note: HikariCP expects `:username` instead of `:user` when supplying authentication credentials. c3p0 expects `:user`, just like in a regular db-spec hash map.
|
||||
|
||||
You will generally want to create the connection pooled datasource at the start of your program (and close it before you exit, although that's not really important since it'll be cleaned up when the JVM shuts down):
|
||||
|
||||
```clojure
|
||||
|
|
|
|||
Loading…
Reference in a new issue