Skip to content

Commit a4cada5

Browse files
committed
Use own error type for returning error
1 parent 211943d commit a4cada5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

database/query_builder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ func (qb *queryBuilder) DeleteStatement(stmt DeleteStatement) (string, error) {
247247
if where != "" {
248248
where = fmt.Sprintf(" WHERE %s", where)
249249
} else {
250-
return "", errors.New("cannot use DeleteStatement() without where statement - use DeleteAllStatement() instead")
250+
return "", fmt.Errorf("%w: %s", ErrMissingStatementPart, "cannot use DeleteStatement() without where statement - use DeleteAllStatement() instead")
251251
}
252252

253253
return fmt.Sprintf(

0 commit comments

Comments
 (0)