From 3f0716b2a4e3d21aa48d626cb894eee07ef6d9d8 Mon Sep 17 00:00:00 2001 From: Nikita Sivukhin Date: Wed, 2 Jul 2025 11:35:35 +0400 Subject: [PATCH] add capture_changes per-connection flag --- core/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/lib.rs b/core/lib.rs index 4067aac15..9fd1dddb9 100644 --- a/core/lib.rs +++ b/core/lib.rs @@ -278,6 +278,7 @@ impl Database { cache_size: Cell::new(default_cache_size), readonly: Cell::new(false), wal_checkpoint_disabled: Cell::new(false), + capture_changes: Cell::new(false), }); if let Err(e) = conn.register_builtins() { return Err(LimboError::ExtensionError(e)); @@ -330,6 +331,7 @@ impl Database { cache_size: Cell::new(default_cache_size), readonly: Cell::new(false), wal_checkpoint_disabled: Cell::new(false), + capture_changes: Cell::new(false), }); if let Err(e) = conn.register_builtins() { @@ -450,6 +452,7 @@ pub struct Connection { cache_size: Cell, readonly: Cell, wal_checkpoint_disabled: Cell, + capture_changes: Cell, } impl Connection { @@ -724,6 +727,13 @@ impl Connection { self.cache_size.set(size); } + pub fn get_capture_changes(&self) -> bool { + self.capture_changes.get() + } + pub fn set_capture_changes(&self, value: bool) { + self.capture_changes.set(value); + } + #[cfg(feature = "fs")] pub fn open_new(&self, path: &str, vfs: &str) -> Result<(Arc, Arc)> { Database::open_with_vfs(&self._db, path, vfs)