Skip to content

Commit f4b0ac6

Browse files
committed
deduplicate formatting of OR in SqliteOnConflict
1 parent 40713cb commit f4b0ac6

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/ast/dml.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,8 @@ impl Display for Insert {
505505
self.table_name.to_string()
506506
};
507507

508-
if let Some(action) = self.or {
509-
write!(f, "INSERT OR {action} INTO {table_name} ")?;
508+
if let Some(on_conflict) = self.or {
509+
write!(f, "INSERT {on_conflict} INTO {table_name} ")?;
510510
} else {
511511
write!(
512512
f,

src/ast/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6311,11 +6311,11 @@ impl fmt::Display for SqliteOnConflict {
63116311
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
63126312
use SqliteOnConflict::*;
63136313
match self {
6314-
Rollback => write!(f, "ROLLBACK"),
6315-
Abort => write!(f, "ABORT"),
6316-
Fail => write!(f, "FAIL"),
6317-
Ignore => write!(f, "IGNORE"),
6318-
Replace => write!(f, "REPLACE"),
6314+
Rollback => write!(f, "OR ROLLBACK"),
6315+
Abort => write!(f, "OR ABORT"),
6316+
Fail => write!(f, "OR FAIL"),
6317+
Ignore => write!(f, "OR IGNORE"),
6318+
Replace => write!(f, "OR REPLACE"),
63196319
}
63206320
}
63216321
}

0 commit comments

Comments
 (0)