-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add transaction related method #360
base: main
Are you sure you want to change the base?
Conversation
So strange, I run |
48d0780
to
17da5f4
Compare
78d279f
to
60a1b79
Compare
driver/src/conn.rs
Outdated
@@ -190,6 +190,21 @@ pub trait Connection: DynClone + Send + Sync { | |||
)) | |||
} | |||
|
|||
async fn begin(&self) -> Result<()> { | |||
let _ = self.exec("BEGIN").await; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
errors should be handled?
2be8397
to
f6e3db8
Compare
let (val,): (i32,) = row.try_into().unwrap(); | ||
assert_eq!(val, 1); | ||
|
||
conn.rollback().await.unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should recheck after rollback?
begin
,commit
,rollback
transaction method.