mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-09 21:38:08 -06:00
[feature/performance] sqlite pragma optimize on close (#2596)
* wrap database drivers in order to handle error processing, hooks, etc * remove dead code * add code comment, remove unused blank imports
This commit is contained in:
parent
b6fe8e7a5b
commit
6738fd5bb0
31 changed files with 372 additions and 660 deletions
|
|
@ -38,7 +38,7 @@ import (
|
|||
)
|
||||
|
||||
type emojiDB struct {
|
||||
db *DB
|
||||
db *bun.DB
|
||||
state *state.State
|
||||
}
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ func (e *emojiDB) DeleteEmojiByID(ctx context.Context, id string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
return e.db.RunInTx(ctx, func(tx Tx) error {
|
||||
return e.db.RunInTx(ctx, nil, func(ctx context.Context, tx bun.Tx) error {
|
||||
// Delete relational links between this emoji
|
||||
// and any statuses using it, returning the
|
||||
// status IDs so we can later update them.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue