MCPcopy Create free account
hub / github.com/HFQR/xitca-web / commit

Method commit

postgres/src/transaction.rs:59–72  ·  view source on GitHub ↗
(&mut self, cli: impl ClientBorrowMut)

Source from the content-addressed store, hash-verified

57 .borrow_cli_ref()
58 .query_unbounded_raw(sql.as_ref())
59 .map(|(opt, res)| opt.into_response(res))
60 .map(RowAffected::from);
61
62 async { res?.await.map(|_| ()) }
63 }
64
65 async fn commit(&mut self, cli: impl ClientBorrowMut) -> Result<(), Error> {
66 self.state = State::Finish;
67
68 match self.depth {
69 0 => Cow::Borrowed("COMMIT"),
70 depth => match self.name {
71 None => Cow::Owned(format!("RELEASE sp_{depth}")),
72 Some(ref name) => Cow::Owned(format!("RELEASE {name}")),
73 },
74 }
75 .execute(cli.borrow_cli_ref())

Callers 1

mainFunction · 0.45

Calls 4

mapMethod · 0.45
executeMethod · 0.45
borrow_cli_refMethod · 0.45
deref_mutMethod · 0.45

Tested by

no test coverage detected