Skip to content

Commit 75da6f5

Browse files
committed
deferrable could be entirely empty
1 parent 7ceb1be commit 75da6f5

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/driver/transaction.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,11 @@ impl RustTransaction {
123123
if let Some(read_var) = self.read_variant {
124124
querystring.push_str(format!(" {}", &read_var.to_str_option()).as_str());
125125
}
126-
127-
if self.deferable.is_some() {
128-
querystring.push_str(" DEFERRABLE");
129-
} else {
130-
querystring.push_str(" NOT DEFERRABLE");
131-
}
126+
querystring.push_str(match self.deferable {
127+
Some(true) => " DEFERRABLE",
128+
Some(false) => " NOT DEFERRABLE",
129+
None => "",
130+
});
132131

133132
let db_client_arc = self.db_client.clone();
134133
let db_client_guard = db_client_arc.read().await;

0 commit comments

Comments
 (0)