enable indices in the python SDK

This commit is contained in:
Nikita Sivukhin
2025-08-13 16:10:27 +04:00
parent bfa33a27e2
commit 857f9147f6
2 changed files with 21 additions and 4 deletions

View File

@@ -315,10 +315,9 @@ impl Drop for Connection {
}
#[allow(clippy::arc_with_non_send_sync)]
#[pyfunction(signature = (path, experimental_indexes=None))]
pub fn connect(path: &str, experimental_indexes: Option<bool>) -> Result<Connection> {
let experimental_indexes = experimental_indexes.unwrap_or(true);
match turso_core::Connection::from_uri(path, experimental_indexes, false, false) {
#[pyfunction(signature = (path))]
pub fn connect(path: &str) -> Result<Connection> {
match turso_core::Connection::from_uri(path, true, false, false) {
Ok((io, conn)) => Ok(Connection { conn, _io: io }),
Err(e) => Err(PyErr::new::<ProgrammingError, _>(format!(
"Failed to create connection: {e:?}"