From 1ff454853b49eae006700f2b041dff859b3a0692 Mon Sep 17 00:00:00 2001 From: Diego Reis Date: Sun, 25 May 2025 14:47:04 -0300 Subject: [PATCH] bind/js: Add close metho to Database --- bindings/javascript/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bindings/javascript/src/lib.rs b/bindings/javascript/src/lib.rs index 5c42aebcc..6cb3eab2f 100644 --- a/bindings/javascript/src/lib.rs +++ b/bindings/javascript/src/lib.rs @@ -124,8 +124,9 @@ impl Database { } #[napi] - pub fn close(&self) { - todo!() + pub fn close(&self) -> napi::Result<()> { + self.conn.close().map_err(into_napi_error)?; + Ok(()) } }