Skip to content

Commit

Permalink
Merge branch 'master' into fix/fix-group-by-kid
Browse files Browse the repository at this point in the history
  • Loading branch information
jrconlin authored Oct 4, 2019
2 parents c35270f + 4e5672d commit 041cb11
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/db/spanner/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ impl SpannerDb {
.get_string_value()
.parse::<i32>()
.map_err(|e| DbErrorKind::Integrity(e.to_string()))?;
self.coll_cache.put(id, name.to_owned())?;
if !self.in_write_transaction() {
self.coll_cache.put(id, name.to_owned())?;
}
Ok(id)
}

Expand Down Expand Up @@ -177,7 +179,6 @@ impl SpannerDb {
"collectionid" => id.to_string(),
})
.execute(&self.conn)?;
self.coll_cache.put(id, name.to_owned())?;
Ok(id)
}

Expand Down Expand Up @@ -604,7 +605,9 @@ impl SpannerDb {
.map_err(|e| DbErrorKind::Integrity(e.to_string()))?;
let name = row[1].get_string_value().to_owned();
names.insert(id, name.clone());
self.coll_cache.put(id, name)?;
if !self.in_write_transaction() {
self.coll_cache.put(id, name)?;
}
}
}

Expand Down

0 comments on commit 041cb11

Please sign in to comment.