@@ -6,34 +6,34 @@ import (
66 pgxHelpers "github.com/vgarvardt/pgx-helpers"
77)
88
9- // ConnPoolAdapter is the adapter type for PGx connection pool connection type
10- type ConnPoolAdapter struct {
9+ // ConnPool is the adapter type for PGx connection pool connection type
10+ type ConnPool struct {
1111 conn * pgx.ConnPool
1212}
1313
14- // NewConnPoolAdapter instantiates PGx connection pool adapter
15- func NewConnPoolAdapter (conn * pgx.ConnPool ) * ConnPoolAdapter {
16- return & ConnPoolAdapter {conn }
14+ // NewConnPool instantiates PGx connection pool adapter
15+ func NewConnPool (conn * pgx.ConnPool ) * ConnPool {
16+ return & ConnPool {conn }
1717}
1818
19- // ConnAdapter is the adapter type for PGx connection connection type
20- type ConnAdapter struct {
19+ // Conn is the adapter type for PGx connection connection type
20+ type Conn struct {
2121 conn * pgx.Conn
2222}
2323
24- // NewConnAdapter instantiates PGx connection adapter
25- func NewConnAdapter (conn * pgx.Conn ) * ConnAdapter {
26- return & ConnAdapter {conn }
24+ // NewConn instantiates PGx connection adapter
25+ func NewConn (conn * pgx.Conn ) * Conn {
26+ return & Conn {conn }
2727}
2828
2929// Exec runs a query and returns an error if any
30- func (a * ConnPoolAdapter ) Exec (query string , args ... interface {}) error {
30+ func (a * ConnPool ) Exec (query string , args ... interface {}) error {
3131 _ , err := a .conn .Exec (query , args ... )
3232 return err
3333}
3434
3535// SelectOne runs a select query and scans the object into a struct or returns an error
36- func (a * ConnPoolAdapter ) SelectOne (dst interface {}, query string , args ... interface {}) error {
36+ func (a * ConnPool ) SelectOne (dst interface {}, query string , args ... interface {}) error {
3737 row := a .conn .QueryRow (query , args ... )
3838 if err := pgxHelpers .ScanStruct (row , dst ); err != nil {
3939 if err == pgx .ErrNoRows {
@@ -46,13 +46,13 @@ func (a *ConnPoolAdapter) SelectOne(dst interface{}, query string, args ...inter
4646}
4747
4848// Exec runs a query and returns an error if any
49- func (a * ConnAdapter ) Exec (query string , args ... interface {}) error {
49+ func (a * Conn ) Exec (query string , args ... interface {}) error {
5050 _ , err := a .conn .Exec (query , args ... )
5151 return err
5252}
5353
5454// SelectOne runs a select query and scans the object into a struct or returns an error
55- func (a * ConnAdapter ) SelectOne (dst interface {}, query string , args ... interface {}) error {
55+ func (a * Conn ) SelectOne (dst interface {}, query string , args ... interface {}) error {
5656 row := a .conn .QueryRow (query , args ... )
5757 if err := pgxHelpers .ScanStruct (row , dst ); err != nil {
5858 if err == pgx .ErrNoRows {
0 commit comments