func (i *internalCopyOnWriteIndexer) Apply(ops []cow.Op) error {
	for _, op := range ops {
		opType := op.Type()
		switch opType {
		case "add":
			i.add(op.Context().(*expr.Conjunction))
		case "delete":
			i.delette(op.Context().(int))
		default:
			return fmt.Errorf("unsupported type: %s", opType)
		}
	}
	return nil
}
Apply applies the ops on itself in the order.
package indexer
import (
	"fmt"
	"github.com/csimplestring/bool-expr-indexer/api/dnf/expr"
	cow "github.com/csimplestring/go-cow-loader"
)
type MutableIndexer interface {
	MaxKSize() int
	Add(c *expr.Conjunction) error
	Delete(ID int) error
	Get(conjunctionSize int, labels expr.Assignment) []*Record
}
var _ MutableIndexer = (*CopyOnWriteIndexer)(nil)
var _ Indexer = (*CopyOnWriteIndexer)(nil)
type internalCopyOnWriteIndexer struct {
	*MemReadOnlyIndexer
}