Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion go/adbc/sqldriver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ func (c *connector) Connect(ctx context.Context) (driver.Conn, error) {
// mainly to maintain compatibility with the Driver method on sql.DB
func (c *connector) Driver() driver.Driver { return Driver{c.drv} }

// Close closes the underlying database handle that the connector was using.
//
// By implementing the io.Closer interface, sql.DB will correctly call
// Close on the connector when sql.DB.Close is called.
func (c *connector) Close() error {
return c.db.Close()
}

type Driver struct {
Driver adbc.Driver
}
Expand Down Expand Up @@ -638,8 +646,10 @@ func (r *rows) Close() error {

r.rdr.Release()
r.rdr = nil

err := r.stmt.Close()
r.stmt = nil
return nil
return err
}

func (r *rows) Next(dest []driver.Value) error {
Expand Down
Loading