lxd/db/profiles.mapper.go
func (c *ClusterTx) ProfileDelete(project string, name string) error {
	stmt := c.stmt(profileDelete)
	result, err := stmt.Exec(project, name)
	if err != nil {
		return errors.Wrap(err, "Delete profile")
	}

	n, err := result.RowsAffected()
	if err != nil {
		return errors.Wrap(err, "Fetch affected rows")
	}
	if n != 1 {
		return fmt.Errorf("Query deleted %d rows instead of 1", n)
	}

	return nil
}
func (c *ClusterTx) ProfileDelete(project string, name string) error {
	stmt := c.stmt(profileDelete)
	result, err := stmt.Exec(project, name)
	if err != nil {
		return errors.Wrap(err, "Delete profile")
	}

	n, err := result.RowsAffected()
	if err != nil {
		return errors.Wrap(err, "Fetch affected rows")
	}
	if n != 1 {
		return fmt.Errorf("Query deleted %d rows instead of 1", n)
	}

	return nil
}
// ProfileDelete deletes the profile matching the given key parameters.