Skip to content

Commit

Permalink
Merge pull request #65 from DATA-DOG/oldVersions
Browse files Browse the repository at this point in the history
Chore: Clean up support for Go versions < 1.12
  • Loading branch information
flimzy authored Jul 24, 2024
2 parents 367bc92 + 3588446 commit a5c9e63
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 38 deletions.
2 changes: 0 additions & 2 deletions db_go18.go → context.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//go:build go1.8

package txdb

import (
Expand Down
14 changes: 14 additions & 0 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,20 @@ func (c *conn) Query(query string, args []driver.Value) (driver.Rows, error) {
return buildRows(rs)
}

// Implement the NamedValueChecker interface
func (c *conn) CheckNamedValue(nv *driver.NamedValue) error {
if nvc, ok := c.drv.realConn.(driver.NamedValueChecker); ok {
return nvc.CheckNamedValue(nv)
}

switch nv.Value.(type) {
case sql.Out:
return nil
default:
return driver.ErrSkip
}
}

type stmt struct {
mu sync.Mutex
st *sql.Stmt
Expand Down
14 changes: 0 additions & 14 deletions db_before_go18.go

This file was deleted.

22 changes: 0 additions & 22 deletions db_go19.go

This file was deleted.

0 comments on commit a5c9e63

Please sign in to comment.