Skip to content

Commit

Permalink
fix handle error
Browse files Browse the repository at this point in the history
  • Loading branch information
hantmac committed Mar 21, 2024
1 parent 60a1b79 commit 60329f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions driver/src/conn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,17 +191,17 @@ pub trait Connection: DynClone + Send + Sync {
}

async fn begin(&self) -> Result<()> {
let _ = self.exec("BEGIN").await;
self.exec("BEGIN").await?;
Ok(())
}

async fn commit(&self) -> Result<()> {
let _ = self.exec("COMMIT").await;
self.exec("COMMIT").await?;
Ok(())
}

async fn rollback(&self) -> Result<()> {
let _ = self.exec("ROLLBACK").await;
self.exec("ROLLBACK").await?;
Ok(())
}

Expand Down
3 changes: 2 additions & 1 deletion driver/tests/driver/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
// See the License for the specific language governing permissions and
// limitations under the License.

pub static DEFAULT_DSN: &str = "databend://root:@localhost:8000/default?sslmode=disable";
pub static DEFAULT_DSN: &str =
"databend://databend:databend@localhost:8000/default?sslmode=disable";

0 comments on commit 60329f6

Please sign in to comment.