update to latest bstore (with support for an index on a []string: Message.DKIMDomains), and cyclic data types (to be used for Message.Part soon); also adds a context.Context to database operations.

This commit is contained in:
Mechiel Lukkien
2023-05-22 14:40:36 +02:00
parent f6ed860ccb
commit e81930ba20
58 changed files with 1970 additions and 1035 deletions

View File

@ -1879,7 +1879,7 @@ func cmdEnsureParsed(c *cmd) {
}()
n := 0
err = a.DB.Write(func(tx *bstore.Tx) error {
err = a.DB.Write(context.Background(), func(tx *bstore.Tx) error {
q := bstore.QueryTx[store.Message](tx)
q.FilterFn(func(m store.Message) bool {
return all || m.ParsedBuf == nil
@ -1952,7 +1952,7 @@ func cmdBumpUIDValidity(c *cmd) {
}()
var uidvalidity uint32
err = a.DB.Write(func(tx *bstore.Tx) error {
err = a.DB.Write(context.Background(), func(tx *bstore.Tx) error {
mb, err := bstore.QueryTx[store.Mailbox](tx).FilterEqual("Name", args[1]).Get()
if err != nil {
return fmt.Errorf("looking up mailbox: %v", err)