diff --git a/bindings/rust/src/lib.rs b/bindings/rust/src/lib.rs index 8c57e7909..6c04c231a 100644 --- a/bindings/rust/src/lib.rs +++ b/bindings/rust/src/lib.rs @@ -129,6 +129,14 @@ pub struct Statement { inner: Arc>, } +impl Clone for Statement { + fn clone(&self) -> Self { + Self { + inner: Arc::clone(&self.inner), + } + } +} + unsafe impl Send for Statement {} unsafe impl Sync for Statement {} @@ -241,6 +249,14 @@ pub struct Rows { inner: Arc>, } +impl Clone for Rows { + fn clone(&self) -> Self { + Self { + inner: Arc::clone(&self.inner), + } + } +} + unsafe impl Send for Rows {} unsafe impl Sync for Rows {} @@ -281,4 +297,8 @@ impl Row { limbo_core::OwnedValue::Blob(items) => Ok(Value::Blob(items.to_vec())), } } + + pub fn column_count(&self) -> usize { + self.values.len() + } }