Browse Source

Fix some XXX'd out bits.

Kestrel 2 years ago
parent
commit
946e437e39
2 changed files with 2 additions and 5 deletions
  1. 2 4
      microrm/src/lib.rs
  2. 0 1
      microrm/src/query.rs

+ 2 - 4
microrm/src/lib.rs

@@ -150,7 +150,7 @@ impl DB {
         }
 
         let qi = query::QueryInterface::new(self);
-        let hash: Option<Metaschema> = None; // XXX qi.get_one_by(meta::MetaschemaColumns::Key, "schema_hash");
+        let hash: Option<WithID<Metaschema>> = qi.get_one_by(meta::Metaschema::Key, "schema_hash");
 
         if hash.is_none() {
             if mode == CreateMode::MustExist {
@@ -182,7 +182,6 @@ impl DB {
 
         let qi = query::QueryInterface::new(self);
 
-        /* XXX
         let add_result = qi.add(&meta::Metaschema {
             key: "schema_hash".to_string(),
             value: self.schema_hash.clone(),
@@ -190,10 +189,9 @@ impl DB {
 
         assert!(add_result.is_some());
 
-        let sanity_check = qi.get_one_by(meta::MetaschemaColumns::Key, "schema_hash");
+        let sanity_check = qi.get_one_by(meta::Metaschema::Key, "schema_hash");
         assert!(sanity_check.is_some());
         assert_eq!(sanity_check.unwrap().value, self.schema_hash);
-        */
 
         Ok(())
     }

+ 0 - 1
microrm/src/query.rs

@@ -1,4 +1,3 @@
-use std::any::Any;
 use std::hash::Hash;
 
 use crate::entity::{Entity, EntityColumn, EntityID};