|
@@ -94,16 +94,15 @@ impl<'r, 'q, T: Entity> QueryComponent for Entire<'r, 'q, T> {
|
|
|
}
|
|
|
|
|
|
fn bind(&self, stmt: &mut sqlite::Statement<'_>) -> Result<usize, Error> {
|
|
|
- let ind = self.wrap.bind(stmt)?;
|
|
|
+ let mut ind = self.wrap.bind(stmt)?;
|
|
|
|
|
|
- let values = self.to.values();
|
|
|
+ self.to.visit_values::<Error,_>(&mut |val| {
|
|
|
+ val.bind_to(stmt, ind)?;
|
|
|
+ ind += 1;
|
|
|
+ Ok(())
|
|
|
+ })?;
|
|
|
|
|
|
- // skip ID
|
|
|
- for col in 0..T::column_count()-1 {
|
|
|
- values[col].bind_to(stmt, ind + col)?;
|
|
|
- }
|
|
|
-
|
|
|
- Ok(ind + T::column_count() - 1)
|
|
|
+ Ok(ind)
|
|
|
}
|
|
|
}
|
|
|
|