Skip to content

Commit

Permalink
🐛 Support reused connection for better performance.
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Ortel <[email protected]>
  • Loading branch information
jortel committed Oct 8, 2024
1 parent 6b050e7 commit a62ba06
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions database/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,14 @@ func (c *Conn) Ping(ctx context.Context) (err error) {
}

func (c *Conn) ResetSession(ctx context.Context) (err error) {
c.release()
if p, cast := c.wrapped.(driver.SessionResetter); cast {
err = p.ResetSession(ctx)
}
return
}
func (c *Conn) IsValid() (b bool) {
b = true
if p, cast := c.wrapped.(driver.Validator); cast {
b = p.IsValid()
}
Expand Down

0 comments on commit a62ba06

Please sign in to comment.