WIP: Add persistence to new docks

This commit is contained in:
Mikayla Maki 2023-05-17 17:34:20 -07:00
parent 4898417617
commit 89d8bb1425
No known key found for this signature in database
7 changed files with 181 additions and 26 deletions

View file

@ -236,7 +236,7 @@ impl<'a> Statement<'a> {
Ok(str::from_utf8(slice)?)
}
pub fn bind<T: Bind>(&self, value: T, index: i32) -> Result<i32> {
pub fn bind<T: Bind>(&self, value: &T, index: i32) -> Result<i32> {
debug_assert!(index > 0);
Ok(value.bind(self, index)?)
}
@ -258,7 +258,7 @@ impl<'a> Statement<'a> {
}
}
pub fn with_bindings(&mut self, bindings: impl Bind) -> Result<&mut Self> {
pub fn with_bindings(&mut self, bindings: &impl Bind) -> Result<&mut Self> {
self.bind(bindings, 1)?;
Ok(self)
}
@ -464,7 +464,7 @@ mod test {
connection
.exec(indoc! {"
CREATE TABLE texts (
text TEXT
text TEXT
)"})
.unwrap()()
.unwrap();