Skip to content

Commit

Permalink
Temporary constructor for the ChangeSet while migration
Browse files Browse the repository at this point in the history
  • Loading branch information
citizen-stig committed May 6, 2024
1 parent b224c28 commit 886918c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/cache/change_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ impl ChangeSet {
}
}

/// Create new `ChangeSet
pub fn new_with_operations(id: SnapshotId, operations: SchemaBatch) -> Self {
Self {
id, operations
}

}

/// Get value from its own cache
pub fn get<S: Schema>(&self, key: &impl KeyCodec<S>) -> anyhow::Result<Option<&Operation>> {
self.operations.get(key)
Expand Down

0 comments on commit 886918c

Please sign in to comment.