Skip to content

Commit

Permalink
Merge pull request #4398 from sgoll/4397-delete-space
Browse files Browse the repository at this point in the history
Remove unnecessary space from DELETE that causes duplication
  • Loading branch information
weiznich authored Dec 19, 2024
2 parents b705023 + da8aa2d commit 330371f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ in a way that makes the pools suitable for use in parallel tests.
* Added `Json` and `Jsonb` support for the SQLite backend.
* Fixed diesel thinking `a.eq_any(b)` was non-nullable even if `a` and `b` were nullable.

### Fixed

* Use a single space instead of two spaces between `DELETE FROM`.

## [2.2.2] 2024-07-19

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion diesel/src/query_builder/delete_statement/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ where
Ret: QueryFragment<DB>,
{
fn walk_ast<'b>(&'b self, mut out: AstPass<'_, 'b, DB>) -> QueryResult<()> {
out.push_sql("DELETE ");
out.push_sql("DELETE");
self.from_clause.walk_ast(out.reborrow())?;
self.where_clause.walk_ast(out.reborrow())?;
self.returning.walk_ast(out.reborrow())?;
Expand Down

0 comments on commit 330371f

Please sign in to comment.