db

package
v0.9.18 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: AGPL-3.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(engine, dsn string, attempts int32) (*sqlx.DB, error)

func ConnectNeo4j added in v0.6.2

func ConnectNeo4j(conf *cfg.Config) (neo4j.DriverWithContext, error)

func CreateDsn

func CreateDsn(dsn *cfg.DBConfig) string

func DBTearDown added in v0.7.0

func DBTearDown(conf *cfg.Config) error

DBTearDown is a helper function to clean up the test database

func InitDB

func InitDB(conf *cfg.DBConfig, log *zerolog.Logger) error

func IsNotNull added in v0.8.0

func IsNotNull(value interface{}) bool

IsNotNull returns true if a value is not "nullish" falsity is not considered nullish

func Migrate

func Migrate(log *zerolog.Logger, conf *cfg.Config, paths ...string) error

Migrate runs the migrations located in the migrations folder paths is a variadic argument, meaning that if no specific path(s) are provided, the program will try to run all of them Otherwise the arguments to path should only include the containing directory name for each migration, e.g. "000001-fix-missing-timestamps"

func Sanitize added in v0.7.2

func Sanitize(s []string) []string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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