Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Clean up support for Go versions < 1.12 #65

Merged
merged 2 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
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
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.

Loading