diff --git a/bindings/python/src/blocking.rs b/bindings/python/src/blocking.rs index f41e6c4c..1b9be255 100644 --- a/bindings/python/src/blocking.rs +++ b/bindings/python/src/blocking.rs @@ -199,11 +199,12 @@ impl BlockingDatabendCursor { operation: String, parameters: Option>, ) -> PyResult { - self.reset(); - let conn = self.conn.clone(); if let Some(param) = parameters { return self.executemany(py, operation, [param].to_vec()); } + + self.reset(); + let conn = self.conn.clone(); // fetch first row after execute // then we could finish the query directly if there's no result let (first, rows) = wait_for_future(py, async move {