modulepackage
0.0.0-20180310195202-f8e6c8b78d37
Repository: https://github.com/nytimes/sqliface.git
Documentation: pkg.go.dev
# README
sqliface
sqliface
is a package for the Go programming language that contains a set of interfaces and implementations that help make code utilizing database/sql
more testable. This package has only been tested with a MySQL database. Pull Requests for utilizing other databases' custom types are appreciated (i.e. mysql.NullTime
).
For documentation check out the GoDoc page.
Examples
Check out the examples directory for examples on how to use this package.
# Packages
No description provided by the author
# Functions
NewMockRows will create a new MockRows instance with the given MockRow set.
NewTypeError returns a TypeError instance.
# Interfaces
ExecCloser implements the Execer interface with an additional Close method.
Execer is an interface that both sql.Tx and sql.DB implement.
Row is an interface implemented by sql.Row, sql.Rows, and MockRow.
Rows is an interface implemented by sql.Rows and MockRows.
# Type aliases
MockRow is database row that implements Row to help test applications using database/sql.