Versions in this module Expand all Collapse all v0 v0.1.0 Nov 30, 2023 Changes in this version + var ErrAlreadyExists = errors.New("object already exists in database") + var ErrNotConnected = errors.New("not connected to the database") + var ErrNotFound = errors.New("object not found in database") + var ErrNotfound = errors.New("record not found or no rows returned") + var ErrReadOnly = errors.New("connected in readonly mode - only readonly transactions allowed") + func BeginTx(ctx context.Context, opts *sql.TxOptions) (tx *sql.Tx, err error) + func Check(err error) error + func Close() (err error) + func Connect(conf config.DatabaseConfig) (err error) + func InitializeSchema() (err error) + func Mock() sqlmock.Sqlmock + func Prep(query string, args ...any) (string, []any) + type Migration struct + Created time.Time + ID int + Name string + Path string + Version string + func Migrations() (data []*Migration, err error) + func (m *Migration) SQL() (_ string, err error)