// Delete deletes a record based on the provided selector
Delete deletes a record based on the provided selector
// Delete deletes a record based on the provided selector
func (c *Collection) Delete(ctx context.Context, selector interface{}) (*CollectionDeleteResult, error) {
	result, err := c.collection.DeleteOne(ctx, selector)
	if err != nil {
		return nil, wrapMongoError(err)
	}
	return &CollectionDeleteResult{int(result.DeletedCount)}, nil
}
func ( c * Collection ) Delete ( ctx context . Context , selector interface { } ) ( * CollectionDeleteResult , error ) { result , err := c . collection . DeleteOne ( ctx , selector ) if err != nil { return nil , wrapMongoError ( err ) } return & CollectionDeleteResult { int ( result . DeletedCount ) } , nil }
Delete deletes a record based on the provided selector
Delete deletes a record based on the provided selector