test_db

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column interface {
	Name() string
	DataType() string
	Nullable() bool
	PrimaryKey() bool
}

func Bool

func Bool(name string, opts ...Option) Column

func Date

func Date(name string, opts ...Option) Column

func Text

func Text(name string, opts ...Option) Column

func Time

func Time(name string, opts ...Option) Column

func Timestamp

func Timestamp(name string, opts ...Option) Column

func Timestamptz

func Timestamptz(name string, opts ...Option) Column

func Timetz

func Timetz(name string, opts ...Option) Column

func UUID

func UUID(name string, opts ...Option) Column

type Option

type Option func(*basecolumn)

func Nullable

func Nullable() Option

func PrimaryKey

func PrimaryKey() Option

type Table

type Table struct {
	Name    string
	Columns []Column
}

func (*Table) Create

func (t *Table) Create() string

func (*Table) Drop

func (t *Table) Drop() string

type TestDB

type TestDB struct {
	Tables []Table
	// contains filtered or unexported fields
}

modeled after ts/src/testutils/db/test_db.ts

func (*TestDB) AfterAll

func (tdb *TestDB) AfterAll() error

func (*TestDB) BeforeAll

func (tdb *TestDB) BeforeAll() error

Jump to

Keyboard shortcuts

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