dbt

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: MIT Imports: 2 Imported by: 0

README

Database test package

This package is used to test the DB data bindings of github.com/Dadido3/D3money.

For now the following database drivers are supported:

  • sqlite3
  • pgx (PostgreSQL)

Run tests locally

Running the test via go test will use an in memory sqlite database for testing. To run a test with another database driver use

go test --db-driver pgx --db-dsn "host=localhost port=5432 user=test password=test dbname=test sslmode=disable"

This assumes that you have a local PostgreSQL database running at port 5432, with a user test that has access to a database named test.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestAccount

type TestAccount struct {
	ID        uint `gorm:"primaryKey"`
	CreatedAt time.Time
	UpdatedAt time.Time

	Balance money.Value
}

type TestAccountCompositeType

type TestAccountCompositeType struct {
	ID        uint `gorm:"primaryKey"`
	CreatedAt time.Time
	UpdatedAt time.Time

	Balance money.Value `gorm:"type:d3money"`
}

Jump to

Keyboard shortcuts

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