|
@@ -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(())
|
|
|
}
|