// DeleteMany deletes records based on the provided selector, must delete at least one record
DeleteMany deletes records based on the provided selector, must delete at least one record
// DeleteMany deletes records based on the provided selector must delete at least one record
func (m *Must) DeleteMany(ctx context.Context, selector interface{}) (*CollectionDeleteResult, error) {
	result, err := m.collection.DeleteMany(ctx, selector)
	if err != nil {
		return nil, err
	}
	if result.DeletedCount < 1 {
		return nil, NewErrNoDocumentFoundError("Must delete, no document deleted", nil)
	}
	return result, nil
}
func ( m * Must ) DeleteMany ( ctx context . Context , selector interface { } ) ( * CollectionDeleteResult , error ) { result , err := m . collection . DeleteMany ( ctx , selector ) if err != nil { return nil , err } if result . DeletedCount < 1 { return nil , NewErrNoDocumentFoundError ( " " , nil ) } return result , nil }
DeleteMany deletes records based on the provided selector, must delete at least one record
DeleteMany deletes records based on the provided selector must delete at least one record