mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-27 13:04:20 +01:00
Closes #2588 SQLite internally implements `.clone` by doing something like piping `.dump` into a new connection to a database attached to the file you want. This PR implements that by adding an `ApplyWriter` that implements `std::fmt::Write`, and refactors our current `.dump` plumbing to work with any `Write` interface, so we can `.dump` to stdout or `.dump` to a new connection, therefore cloning the database. Reviewed-by: Nikita Sivukhin (@sivukhin) Closes #2590