drivertest

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package drivertest contains a common test suite for all SQL drivers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Declare

func Declare(
	d pksql.Driver,
	setup func(context.Context) *sql.DB,
)

Declare decalres generic behavioral tests for a specific driver implementation.

func MockDB added in v0.3.0

func MockDB() *sql.DB

MockDB returns a database pool that uses the mock connector.

Types

type MockConnector added in v0.3.0

type MockConnector struct {
	driver.Connector
}

MockConnector is mock of the driver.Connector interface.

func (*MockConnector) Driver added in v0.3.0

func (*MockConnector) Driver() driver.Driver

Driver returns the connector's driver.

type MockDriver added in v0.3.0

type MockDriver struct {
	driver.Driver
}

MockDriver is mock of the driver.Driver interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL