We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d6175a commit fb55c45Copy full SHA for fb55c45
src/transaction/transaction.rs
@@ -12,6 +12,19 @@ use std::ops::RangeBounds;
12
/// particular timestamp obtained from the placement driver.
13
///
14
/// Once a transaction is commited, a new commit timestamp is obtained from the placement driver.
15
+///
16
+/// Create a new transaction from a snapshot using `new`.
17
18
+/// ```rust,no_run
19
+/// # #![feature(async_await)]
20
+/// use tikv_client::{Config, transaction::Client};
21
+/// use futures::prelude::*;
22
+/// # futures::executor::block_on(async {
23
+/// let connect = Client::connect(Config::default());
24
+/// let client = connect.await.unwrap();
25
+/// let txn = client.begin();
26
+/// # });
27
+/// ```
28
#[derive(new)]
29
pub struct Transaction {
30
snapshot: Snapshot,
0 commit comments