Skip to content

Commit 7c30b04

Browse files
author
Nicklas Warming Jacobsen
committed
Add fn protected_indexes and fn unsealed_indexes on PreparedRecord
1 parent 6318fc1 commit 7c30b04

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/crypto/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use thiserror::Error;
2020

2121
pub use b64_encode::*;
2222
pub use sealed::{SealedTableEntry, UnsealSpec};
23-
pub use sealer::Sealer;
23+
pub use sealer::{Sealer, UnsealedIndex};
2424
pub use unsealed::Unsealed;
2525

2626
/// In order to stop indexes from exploding with indexes on large strings, cap the number of terms

src/encrypted_table/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ impl PreparedRecord {
169169
.map(|(key, attr)| (key.as_str(), attr))
170170
}
171171

172+
pub fn unsealed_indexes(&self) -> &[UnsealedIndex] {
173+
&self.sealer.unsealed_indexes
174+
}
175+
172176
pub fn prepare_record<R>(record: R) -> Result<Self, SealError>
173177
where
174178
R: Searchable + Identifiable,
@@ -228,6 +232,10 @@ impl PreparedRecord {
228232
pub fn type_name(&self) -> &str {
229233
&self.sealer.type_name
230234
}
235+
236+
pub fn protected_indexes(&self) -> &[(Cow<'static, str>, IndexType)] {
237+
&self.protected_indexes
238+
}
231239
}
232240

233241
impl DynamoRecordPatch {

0 commit comments

Comments
 (0)