diff --git a/bindings/python/src/lib.rs b/bindings/python/src/lib.rs index aca225304..595400a21 100644 --- a/bindings/python/src/lib.rs +++ b/bindings/python/src/lib.rs @@ -104,7 +104,10 @@ impl Cursor { // TODO: use stmt_is_dml to set rowcount if stmt_is_dml { - todo!() + return Err(PyErr::new::( + "DML statements (INSERT/UPDATE/DELETE) are not fully supported in this version", + ) + .into()); } Ok(Cursor { @@ -181,18 +184,24 @@ impl Cursor { } } - pub fn close(&self) -> Result<()> { - todo!() + pub fn close(&self) -> PyResult<()> { + Err(PyErr::new::( + "close() is not supported in this version", + )) } #[pyo3(signature = (sql, parameters=None))] - pub fn executemany(&self, sql: &str, parameters: Option>) { - todo!() + pub fn executemany(&self, sql: &str, parameters: Option>) -> PyResult<()> { + Err(PyErr::new::( + "executemany() is not supported in this version", + )) } #[pyo3(signature = (size=None))] - pub fn fetchmany(&self, size: Option) { - todo!() + pub fn fetchmany(&self, size: Option) -> PyResult>> { + Err(PyErr::new::( + "fetchmany() is not supported in this version", + )) } } @@ -228,12 +237,16 @@ impl Connection { drop(self.conn.clone()); } - pub fn commit(&self) { - todo!() + pub fn commit(&self) -> PyResult<()> { + Err(PyErr::new::( + "Transactions are not supported in this version", + )) } - pub fn rollback(&self) { - todo!() + pub fn rollback(&self) -> PyResult<()> { + Err(PyErr::new::( + "Transactions are not supported in this version", + )) } }