From 98f4e5cd2db959c76749bc8bfda4d5097d92e7d7 Mon Sep 17 00:00:00 2001 From: PThorpe92 Date: Tue, 5 Aug 2025 12:49:24 -0400 Subject: [PATCH] Add comment/TODO about method we use to copy the db file --- core/lib.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/lib.rs b/core/lib.rs index 405ab96df..8f1f4ba6c 100644 --- a/core/lib.rs +++ b/core/lib.rs @@ -1738,8 +1738,13 @@ impl Connection { self.pager.borrow().clone() } - /// Copy the current Database and write out to a new file #[cfg(feature = "fs")] + /// Copy the current Database and write out to a new file. + /// TODO: sqlite3 instead essentially does the equivalent of + /// `.dump` and creates a new .db file from that. + /// + /// Because we are instead making a copy of the File, as a side-effect we are + /// also having to checkpoint the database. pub fn copy_db(&self, file: &str) -> Result<()> { // use a new PlatformIO instance here to allow for copying in-memory databases let io: Arc = Arc::new(PlatformIO::new()?);