mirror of
https://github.com/joohoi/acme-dns.git
synced 2025-01-07 05:50:43 +07:00
fd9ce4606d
* Replace iris with httprouter * Linter fixes * Finalize iris removal * Vendor dependencies for reproducable builds * Api tests are back
28 lines
541 B
Go
28 lines
541 B
Go
package testdb
|
|
|
|
import (
|
|
"database/sql/driver"
|
|
)
|
|
|
|
type stmt struct {
|
|
queryFunc func(args []driver.Value) (driver.Rows, error)
|
|
execFunc func(args []driver.Value) (driver.Result, error)
|
|
}
|
|
|
|
func (s *stmt) Close() error {
|
|
return nil
|
|
}
|
|
|
|
func (s *stmt) NumInput() int {
|
|
// This prevents the sql package from validating the number of inputs
|
|
return -1
|
|
}
|
|
|
|
func (s *stmt) Exec(args []driver.Value) (driver.Result, error) {
|
|
return s.execFunc(args)
|
|
}
|
|
|
|
func (s *stmt) Query(args []driver.Value) (driver.Rows, error) {
|
|
return s.queryFunc(args)
|
|
}
|