database

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0, MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDatabaseNotSupported = errors.New("database not supported")
View Source
var SupportedTestDialects = []string{"postgres", "mysql", "sqlite"}
View Source
var TestConnectionString = "sqlite:file::memory:?cache=shared"

Functions

func DoRetry

func DoRetry(ctx context.Context, f func() error) error

func DropAll

func DropAll(db *gorm.DB) error

func FindDatasetByName

func FindDatasetByName(db *gorm.DB, name string) (model.Dataset, error)

func Open

func Open(connString string, config *gorm.Config) (*gorm.DB, io.Closer, error)

func OpenFromCLI added in v0.2.28

func OpenFromCLI(c *cli.Context) (*gorm.DB, io.Closer, error)

func OpenInMemory

func OpenInMemory() (*gorm.DB, io.Closer, error)

func OpenWithLogger added in v0.3.0

func OpenWithLogger(connString string) (*gorm.DB, io.Closer, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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