Parcourir la source

Add Datum::bind_to implementation for i64 type.

Kestrel il y a 7 mois
Parent
commit
977223b4e1
1 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 3 2
      microrm/src/schema/datum/datum_common.rs

+ 3 - 2
microrm/src/schema/datum/datum_common.rs

@@ -101,8 +101,9 @@ impl Datum for isize {
         "int"
     }
 
-    fn bind_to(&self, _stmt: &mut StatementContext, _index: i32) {
-        todo!()
+    fn bind_to(&self, stmt: &mut StatementContext, index: i32) {
+        stmt.bind(index, *self as i64)
+            .expect("couldn't bind isize as i64");
     }
 
     fn build_from(adata: AssocData, stmt: &mut StatementRow, index: &mut i32) -> DBResult<Self>