mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
Feature: Support multi user per irc network (#78)
* feat: delete irc network in transaction * feat: use compound key for irc handlers * chore: update deps * refactor: start network * refactor: init irc handler * indexers: update network name
This commit is contained in:
parent
f466657ed4
commit
2daeedbdc7
14 changed files with 491 additions and 428 deletions
|
@ -79,3 +79,20 @@ func (db *SqliteDB) Close() error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (db *SqliteDB) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error) {
|
||||
tx, err := db.handler.BeginTx(ctx, opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &Tx{
|
||||
Tx: tx,
|
||||
handler: db,
|
||||
}, nil
|
||||
}
|
||||
|
||||
type Tx struct {
|
||||
*sql.Tx
|
||||
handler *SqliteDB
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue