From 993079e39d36918e143c48dd3602d1342e2fb9f3 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Mon, 21 Jul 2025 12:45:19 +0300 Subject: [PATCH] bindings/python: Add "experimental_indexes" parameter to connect() --- bindings/python/src/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bindings/python/src/lib.rs b/bindings/python/src/lib.rs index b289354ca..419e9481a 100644 --- a/bindings/python/src/lib.rs +++ b/bindings/python/src/lib.rs @@ -315,9 +315,10 @@ impl Drop for Connection { } #[allow(clippy::arc_with_non_send_sync)] -#[pyfunction] -pub fn connect(path: &str) -> Result { - match turso_core::Connection::from_uri(path, false, false) { +#[pyfunction(signature = (path, experimental_indexes=None))] +pub fn connect(path: &str, experimental_indexes: Option) -> Result { + let experimental_indexes = experimental_indexes.unwrap_or(false); + match turso_core::Connection::from_uri(path, experimental_indexes, false) { Ok((io, conn)) => Ok(Connection { conn, _io: io }), Err(e) => Err(PyErr::new::(format!( "Failed to create connection: {e:?}"