This commit is contained in:
2022-12-22 10:06:25 +01:00
parent d4994b8c8d
commit 1aaad66233
3 changed files with 32 additions and 42 deletions

View File

@@ -13,6 +13,7 @@ type DB interface {
Ping(ctx context.Context) error
BeginTransaction(ctx context.Context, iso sql.IsolationLevel) (Tx, error)
AddListener(listener Listener)
Exit() error
}
type database struct {
@@ -121,3 +122,7 @@ func (db *database) BeginTransaction(ctx context.Context, iso sql.IsolationLevel
return NewTransaction(xtx, txid, db.lstr), nil
}
func (db *database) Exit() error {
return db.db.Close()
}