sqldb: ensure that we're using serializable isolation

This commit is contained in:
Andras Banki-Horvath 2024-04-02 16:35:56 +02:00
parent 0609431a0c
commit c6073a14ca
No known key found for this signature in database
GPG Key ID: 80E5375C094198D8

View File

@ -366,7 +366,8 @@ type BaseDB struct {
// struct.
func (s *BaseDB) BeginTx(ctx context.Context, opts TxOptions) (*sql.Tx, error) {
sqlOptions := sql.TxOptions{
ReadOnly: opts.ReadOnly(),
Isolation: sql.LevelSerializable,
ReadOnly: opts.ReadOnly(),
}
return s.DB.BeginTx(ctx, &sqlOptions)