diff --git a/database/query_builder.go b/database/query_builder.go index 74409d3..1eee204 100644 --- a/database/query_builder.go +++ b/database/query_builder.go @@ -247,7 +247,7 @@ func (qb *queryBuilder) DeleteStatement(stmt DeleteStatement) (string, error) { if where != "" { where = fmt.Sprintf(" WHERE %s", where) } else { - return "", errors.New("cannot use DeleteStatement() without where statement - use DeleteAllStatement() instead") + return "", fmt.Errorf("%w: %s", ErrMissingStatementPart, "cannot use DeleteStatement() without where statement - use DeleteAllStatement() instead") } return fmt.Sprintf(