ipfans / echo-session

Package echo-session is a middleware that provides session support for echo.
Apache License 2.0
67 stars 36 forks source link

add postgres pool support #19

Closed shogo-ma closed 6 years ago

shogo-ma commented 6 years ago

I added postgres pool support.

ipfans commented 6 years ago

NewPGStore creates a new PGStore instance and a new database/sql pool.

I think not be necessary to add a new NewPostgresStoreFromPool. If you want to add this, please describe more details about usage.

shogo-ma commented 6 years ago

Sorry for my rough explanation.

  1. I would like to unify the database connection in a session and the database connection of ORM wrapper into one.
  2. I want to use go-sqlmock for a mock of session, so I want to use sql.DB returned bysqlmock.New ().