MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / rollback

Method rollback

src/database/mock.rs:187–198  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

185
186 #[instrument(level = "trace")]
187 fn rollback(&mut self) {
188 match self.transaction.as_mut() {
189 Some(transaction) => {
190 if transaction.rollback(self.db_backend) {
191 if let Some(transaction) = self.transaction.take() {
192 self.transaction_log.push(transaction.into_transaction());
193 }
194 }
195 }
196 None => panic!("There is no open transaction to rollback"),
197 }
198 }
199
200 fn drain_transaction_log(&mut self) -> Vec<Transaction> {
201 std::mem::take(&mut self.transaction_log)

Callers

nothing calls this directly

Calls 3

takeMethod · 0.80
pushMethod · 0.80
into_transactionMethod · 0.80

Tested by

no test coverage detected