func (dd *DeleteDataset) ToSQL() (sql string, params []interface{}, err error) {
	return dd.deleteSQLBuilder().ToSQL()
}
Generates a DELETE sql statement, if Prepared has been called with true then the parameters will not be interpolated.
See examples.

Errors:
* There is an error generating the SQL
package goqu
import (
	"github.com/doug-martin/goqu/v9/exec"
	"github.com/doug-martin/goqu/v9/exp"
	"github.com/doug-martin/goqu/v9/internal/errors"
	"github.com/doug-martin/goqu/v9/internal/sb"
)
var ErrBadFromArgument = errors.New("unsupported DeleteDataset#From argument, a string or identifier expression is required")
type DeleteDataset struct {
	dialect      SQLDialect
	clauses      exp.DeleteClauses
	isPrepared   prepared
	queryFactory exec.QueryFactory
	err          error
}
func newDeleteDataset(d string, queryFactory exec.QueryFactory) *DeleteDataset {
	return &DeleteDataset{
		clauses:      exp.NewDeleteClauses(),
		dialect:      GetDialect(d),
		queryFactory: queryFactory,
		isPrepared:   preparedNoPreference,
		err:          nil,
	}
}
func Delete(table interface{}) *DeleteDataset {
	return newDeleteDataset("default", nil).From(table)
}
func (dd *DeleteDataset) Expression() exp.Expression {
	return dd
}
func (dd *DeleteDataset) Clone() exp.Expression {
	return dd.copy(dd.clauses)
}
func (dd *DeleteDataset) Prepared(prepared bool) *DeleteDataset {
	ret := dd.copy(dd.clauses)
	ret.isPrepared = preparedFromBool(prepared)
	return ret
}
func (dd *DeleteDataset) IsPrepared() bool {
	return dd.isPrepared.Bool()
}
func (dd *DeleteDataset) WithDialect(dl string) *DeleteDataset {
	ds := dd.copy(dd.GetClauses())
	ds.dialect = GetDialect(dl)
	return ds
}
func (dd *DeleteDataset) Dialect() SQLDialect {
	return dd.dialect
}
func (dd *DeleteDataset) SetDialect(dialect SQLDialect) *DeleteDataset {
	cd := dd.copy(dd.GetClauses())
	cd.dialect = dialect
	return cd
}
func (dd *DeleteDataset) GetClauses() exp.DeleteClauses {
	return dd.clauses
}
func (dd *DeleteDataset) copy(clauses exp.DeleteClauses) *DeleteDataset {
	return &DeleteDataset{
		dialect:      dd.dialect,
		clauses:      clauses,
		isPrepared:   dd.isPrepared,
		queryFactory: dd.queryFactory,
		err:          dd.err,
	}
}
func (dd *DeleteDataset) With(name string, subquery exp.Expression) *DeleteDataset {
	return dd.copy(dd.clauses.CommonTablesAppend(exp.NewCommonTableExpression(false, name, subquery)))
}
func (dd *DeleteDataset) WithRecursive(name string, subquery exp.Expression) *DeleteDataset {
	return dd.copy(dd.clauses.CommonTablesAppend(exp.NewCommonTableExpression(true, name, subquery)))
}
func (dd *DeleteDataset) From(table interface{}) *DeleteDataset {
	switch t := table.(type) {
	case exp.IdentifierExpression:
		return dd.copy(dd.clauses.SetFrom(t))
	case string:
		return dd.copy(dd.clauses.SetFrom(exp.ParseIdentifier(t)))
	default:
		panic(ErrBadFromArgument)
	}
}
func (dd *DeleteDataset) Where(expressions ...exp.Expression) *DeleteDataset {
	return dd.copy(dd.clauses.WhereAppend(expressions...))
}
func (dd *DeleteDataset) ClearWhere() *DeleteDataset {
	return dd.copy(dd.clauses.ClearWhere())
}
func (dd *DeleteDataset) Order(order ...exp.OrderedExpression) *DeleteDataset {
	return dd.copy(dd.clauses.SetOrder(order...))
}
func (dd *DeleteDataset) OrderAppend(order ...exp.OrderedExpression) *DeleteDataset {
	return dd.copy(dd.clauses.OrderAppend(order...))
}
func (dd *DeleteDataset) OrderPrepend(order ...exp.OrderedExpression) *DeleteDataset {
	return dd.copy(dd.clauses.OrderPrepend(order...))
}
func (dd *DeleteDataset) ClearOrder() *DeleteDataset {
	return dd.copy(dd.clauses.ClearOrder())
}
func (dd *DeleteDataset) Limit(limit uint) *DeleteDataset {
	if limit > 0 {
		return dd.copy(dd.clauses.SetLimit(limit))
	}
	return dd.copy(dd.clauses.ClearLimit())
}
func (dd *DeleteDataset) LimitAll() *DeleteDataset {
	return dd.copy(dd.clauses.SetLimit(L("ALL")))
}
func (dd *DeleteDataset) ClearLimit() *DeleteDataset {
	return dd.copy(dd.clauses.ClearLimit())
}
func (dd *DeleteDataset) Returning(returning ...interface{}) *DeleteDataset {
	return dd.copy(dd.clauses.SetReturning(exp.NewColumnListExpression(returning...)))
}
func (dd *DeleteDataset) Error() error {
	return dd.err
}
func (dd *DeleteDataset) SetError(err error) *DeleteDataset {
	if dd.err == nil {
		dd.err = err
	}
	return dd
}