mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-07 17:24:24 +01:00
Add comment/TODO about method we use to copy the db file
This commit is contained in:
@@ -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<dyn IO> = Arc::new(PlatformIO::new()?);
|
||||
|
||||
Reference in New Issue
Block a user