A nicer way to specify connection pool implementation #56

Closed
wants to merge 1 commit into
from

Projects

None yet

1 participant

@jsyrjala
Contributor

If db-spec contains key :datasource, the corresponding value is used as a datasource without creating a C3P0 connection pool. Typical use case is that application creates connection pool itself and passes the connection pool to korma.

@jsyrjala jsyrjala If db-spec contains key :datasource, the corresponding value is used …
…as a datasource without creating a C3P0 connection pool. Typical use case is that application creates connection pool itself and passes the connection pool to korma.
b7a2734
@jsyrjala jsyrjala referenced this pull request May 18, 2012
Open

Korma is not simple #64

@jsyrjala
Contributor
jsyrjala commented Aug 3, 2012

This code below allows to override c3p0 connection pool creation. Thus this pull request is not needed.

(let [connection-pool ... ;; create connection pool here
        dbh {:pool {:datasource connection-pool}
                 :options (korma.config/extract-options {})}]
  (default-connection dbh)
  )
@jsyrjala jsyrjala closed this Aug 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment