package
2.1.5+incompatible
Repository: https://github.com/demonshreder/abcweb.git
Documentation: pkg.go.dev

# Functions

ExecuteScript executes the passed in SQL script against the passed in db.
GetConnStr returns a connection string for the database software used.
IsMigrated returns true if the database is migrated to the latest migration in the db/migrations folder.
RunMigrations executes the migrations "up" against the passed in database and returns the number of migrations run.
SetupDBData executes the migrations "up" against the passed in database and also inserts the test data defined in testdata.sql and executes the passed in TestdataFunc handler if present, and then returns the number of migrations run.
SetupTestdata executes the passed in sql file against the passed in database and then executes the testdata handler function.
SetupTestSuite fully initializes a test database for you and returns a database connection to that test database and the number of migrations executed.

# Variables

ErrNoMigrations occurs if no migration files can be found on disk.

# Type aliases

TestdataFunc is the function signature for the sql testdata function that performs database operations once the test suite is initialized with migrations and the sql testdata file.