WIP almost compiling with sqlez

This commit is contained in:
Mikayla Maki 2022-11-01 17:26:03 -07:00
parent 777f05eb76
commit 3c1b747f64
8 changed files with 77 additions and 57 deletions

View file

@ -207,3 +207,25 @@ impl<T: Column + Default + Copy, const COUNT: usize> Column for [T; COUNT] {
Ok((array, current_index))
}
}
impl<T: Bind> Bind for Vec<T> {
fn bind(&self, statement: &Statement, start_index: i32) -> Result<i32> {
let mut current_index = start_index;
for binding in self.iter() {
current_index = binding.bind(statement, current_index)?
}
Ok(current_index)
}
}
impl<T: Bind> Bind for &[T] {
fn bind(&self, statement: &Statement, start_index: i32) -> Result<i32> {
let mut current_index = start_index;
for binding in *self {
current_index = binding.bind(statement, current_index)?
}
Ok(current_index)
}
}