Made dev tools not break everything about the db
Also improved multi statements to allow out of order parameter binding in statements Ensured that all statements are run for maybe_row and single, and that of all statements only 1 of them returns only 1 row Made bind and column calls add useful context to errors Co-authored-by: kay@zed.dev
This commit is contained in:
parent
2dc1130902
commit
3e0f9d27a7
13 changed files with 219 additions and 110 deletions
|
@ -1,6 +1,7 @@
|
|||
use std::{
|
||||
ffi::{CStr, CString},
|
||||
marker::PhantomData,
|
||||
path::Path,
|
||||
};
|
||||
|
||||
use anyhow::{anyhow, Result};
|
||||
|
@ -73,6 +74,11 @@ impl Connection {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn backup_main_to(&self, destination: impl AsRef<Path>) -> Result<()> {
|
||||
let destination = Self::open_file(destination.as_ref().to_string_lossy().as_ref());
|
||||
self.backup_main(&destination)
|
||||
}
|
||||
|
||||
pub(crate) fn last_error(&self) -> Result<()> {
|
||||
unsafe {
|
||||
let code = sqlite3_errcode(self.sqlite3);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue