Browse Source

Add Datum::bind_to implementation for i64 type.

Kestrel 7 months ago
parent
commit
977223b4e1
1 changed files with 3 additions and 2 deletions
  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>