Documentation ¶
Index ¶
- func Connect(engine, dsn string) (*sqlx.DB, error)
- func ConnectNeo4j(conf *cfg.Config) (neo4j.DriverWithContext, error)
- func CreateDsn(dsn *cfg.DBConfig) string
- func DBTearDown(conf *cfg.Config) error
- func InitDB(conf *cfg.DBConfig, exitAfter bool, log *zerolog.Logger) error
- func IsNotNull(value interface{}) bool
- func Migrate(conf *cfg.Config, paths ...string) error
- func Sanitize(s []string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectNeo4j ¶ added in v0.6.2
func ConnectNeo4j(conf *cfg.Config) (neo4j.DriverWithContext, error)
func DBTearDown ¶ added in v0.7.0
DBTearDown is a helper function to clean up the test database
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 ¶
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"
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.