testdb

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package testdb is sqlc output used to test quartermaster against the code sqlc really generates. Schema is the DDL the tests apply.

Index

Constants

This section is empty.

Variables

View Source
var Schema string

Schema is applied to the test database before the tests run.

Functions

This section is empty.

Types

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type Item

type Item struct {
	ID   int64
	Name string
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) CountItemsByName

func (q *Queries) CountItemsByName(ctx context.Context, name string) (int64, error)

func (*Queries) InsertItem

func (q *Queries) InsertItem(ctx context.Context, name string) (Item, error)

func (*Queries) IsolationLevel

func (q *Queries) IsolationLevel(ctx context.Context) (string, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

Jump to

Keyboard shortcuts

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