Skip to content

Commit

Permalink
[*] improve NewConn() and NewPool() description
Browse files Browse the repository at this point in the history
  • Loading branch information
pashagolub committed Sep 6, 2023
1 parent e722875 commit 4b48ef3
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ type pgxmockConn struct {
}

// NewConn creates PgxConnIface database connection and a mock to manage expectations.
// Accepts options, like ValueConverterOption, to use a ValueConverter from
// a specific driver.
// Pings db so that all expectations could be
// asserted.
// Accepts options, like QueryMatcherOption, to match SQL query strings in more sophisticated ways.
func NewConn(options ...func(*pgxmock) error) (PgxConnIface, error) {
smock := &pgxmockConn{}
smock.ordered = true
Expand All @@ -31,10 +28,7 @@ type pgxmockPool struct {
}

// NewPool creates PgxPoolIface pool of database connections and a mock to manage expectations.
// Accepts options, like ValueConverterOption, to use a ValueConverter from
// a specific driver.
// Pings db so that all expectations could be
// asserted.
// Accepts options, like QueryMatcherOption, to match SQL query strings in more sophisticated ways.
func NewPool(options ...func(*pgxmock) error) (PgxPoolIface, error) {
smock := &pgxmockPool{}
smock.ordered = true
Expand Down

0 comments on commit 4b48ef3

Please sign in to comment.