testdb

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package testdb expose internal utilities for testing against a postgres database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseDB

func CloseDB(db *sqlx.DB) error

func CreateDBAndData

func CreateDBAndData(dbName string) (*sqlx.DB, error)

func CreateDBWithWrongData

func CreateDBWithWrongData(dbName string) (*sqlx.DB, error)

func EmptyDBCursor

func EmptyDBCursor(db *sqlx.DB) (*sqlx.Rows, error)

func OpenDB

func OpenDB(dbName string) (*sqlx.DB, error)

func OpenDBCursor

func OpenDBCursor(db *sqlx.DB) (*sqlx.Rows, error)

func UniqueDBName

func UniqueDBName() string

Types

type DummyRow

type DummyRow struct {
	A int    `db:"a"`
	B string `db:"b"`
}

Jump to

Keyboard shortcuts

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