From a62ba06e085adc65090299dddd6d7eacef71201c Mon Sep 17 00:00:00 2001 From: Jeff Ortel Date: Tue, 8 Oct 2024 11:25:41 -0700 Subject: [PATCH] :bug: Support reused connection for better performance. Signed-off-by: Jeff Ortel --- database/driver.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/database/driver.go b/database/driver.go index 14bfbb1f..bcbcf645 100644 --- a/database/driver.go +++ b/database/driver.go @@ -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() }